AutoMapper 5 - AutoScanning and integration with ABP...
See original GitHub issueMoving from ABP 0.9.7/ AutoMapper 4.21 to ABP 1.x / AutoMapper 5.1.x
We want to use the AutoMapper scanning feature to pick up all our profiles viz:
Mapper.Initialize(cfg => { cfg.AddProfiles("MyNameSpace.Assembly1", "MyOtherNameSpace.Assembly1", ....);
So I am guessing I put this in the application module PostInitialize as per #1311.
- Is there anything else I need to do?
- How does ABP integrate with this considering the single call to Initialize() which spins up AutoMapper?
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Object To Object Mapping | Documentation Center | ABP.IO
ABP provides abstractions for object to object mapping and has an integration package to use AutoMapper as the object mapper.
Read more >Object To Object Mapping (and AutoMapper Integration)
The Abp.AutoMapper module defines a mapping to convert LocalizableString (or ILocalizableString) objects to string objects. It makes the conversion using ...
Read more >c# - Abp.io AutoMapper extension ...
Using the abp.io framework on their implementation of AutoMapper which is integrated with the framework I'm having some issues mapping ...
Read more >Configuration
Configuring visibility By default, AutoMapper only recognizes public members. It can map to private setters, but will skip internal/private methods and ...
Read more >How to configure AutoMapper for another application #4831
The Abp.AutoMapper NuGet package module implements the IObjectMapper and provides additional features. Installation. First, install the Abp.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If ABP is initialized in your project, then do all mappings inside
Configuration.Modules.AbpAutoMapper().Configurators.Add(...)
. You can call other non-abp dlls from here, no problem. If ABP is not initialized, then no problem, it will not call Mapper.Initialize at all.I’m not using AssertConfigurationIsValid since it has very strict rules and enforces custom mappings. If you want to use it, I suggest you to do it in your PostInitialize method: