Open Closed

ANZ 7 to 7.2.2 - AutoMapper Question #7691


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)
  • 0
    maliming created

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

  • 0
    dexmox created

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