Aspnetboilerplate: Compatibility with AutoMapper v5.0.0

Created on 1 Jul 2016  路  3Comments  路  Source: aspnetboilerplate/aspnetboilerplate

Is ABP already compatible with latest AutoMapper 5?

breaking-change

Most helpful comment

This was a breaking change for existing applications. To fix it, we should make custom mappings like that:

C# Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration => { //Add mappings. Example: //configuration.CreateMap<MySourceClass, MyDestClass>(); });

No chanege for who uses AbpAutoMap, AbpAutoMapFrom and AbpAutoMapTo attributes.

Also, DynamicMap is not used in AutoMapper anymore (see https://github.com/AutoMapper/AutoMapper/issues/1546#issuecomment-233979992). If you need it, just use configuration.CreateMissingTypeMaps = true; in the code above.

All 3 comments

Did not try AutoMapper 5 yet. Abp.AutoMapper package maybe incompatible. But you don't have to use it. ABP has no any dependency to a mapping library actually.

This was a breaking change for existing applications. To fix it, we should make custom mappings like that:

C# Configuration.Modules.AbpAutoMapper().Configurators.Add(configuration => { //Add mappings. Example: //configuration.CreateMap<MySourceClass, MyDestClass>(); });

No chanege for who uses AbpAutoMap, AbpAutoMapFrom and AbpAutoMapTo attributes.

Also, DynamicMap is not used in AutoMapper anymore (see https://github.com/AutoMapper/AutoMapper/issues/1546#issuecomment-233979992). If you need it, just use configuration.CreateMissingTypeMaps = true; in the code above.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hikalkan picture hikalkan  路  3Comments

Xeevis picture Xeevis  路  3Comments

AlexGeller picture AlexGeller  路  3Comments

wocar picture wocar  路  3Comments

Mehranh picture Mehranh  路  3Comments