Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

ANZ 7 to 7.2.2 - AutoMapper Question #7691


User avatar
0
dexmox created

Hi All,

Thank you in advance.

I've read a some posts on here about automapper being updating to 8.1.1 and no longer supporting automapping. https://support.aspnetzero.com/QA/Questions/7402

@maliming created 2 months ago : Automapper 8.1.1 version modifies CreateMissingTypeMaps, default is false.

I've also noticed since migrating to ANZ 7.2.2 I am now having to add additional mappings that were not required in 7.0.

Example Auto mapper before ANZ 7.0 (CustomDtoMapper.cs):

configuration.CreateMap<TaxType, TaxTypeListDto>();

Example Auto mapper after update to ANZ 7.2.2 (CustomDtoMapper.cs):

configuration.CreateMap<TaxType, TaxTypeListDto>();
configuration.CreateMap<TaxType, TaxTypeDto>(); // Required to be added 

For clarification is it now a requirement to map every single mapping from model to dto, and not have automapper automatically create those mappings ?


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Yes, because of some major changes to Automapper. If you have a problem, please feel free to feedback. : )

  • User Avatar
    0
    dexmox created

    Hi @maliming thanks for the reply and letting me know.