I recently updated my ASPNET CORE from V6.7 to 7.0 and I am getting ampping error "
AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
I am only getting errors for the screens I created using the RAD Tool. This is happening when I am trying to edit the Entity
3 Answer(s)
-
0
var output = new GetTemplateForEditOutput { Template = ObjectMapper.Map<CreateOrEditTemplateDto>(template) };
This is where it's errroing
-
0
The new version of AutoMapper, requires explicitly adding mapping for your DTOs. If the DTO and your entity properties are not equal, you need to ignore those properties
configuration.CreateMap<Foo, Bar>().ForMember(x => x.MyProperty, opt => opt.Ignore())
Add your custom DTO mappings to CustomDtoMapper
-
0
Thank you I completely removed the Automapper from the custiom code. Didn't make any sense to use it .
But this should have been marked as a breaking change