7 Answer(s)
-
0
Please check if this can be single step solution or I have to add ReverseMap() in every map in custom mapper. What about Rad Tool? It should also add ReverseMap in custom mapper.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
1
I am seeing this problem using the Rad Power Tools 2.0.2.1 with a new V7.1.0 AspNetZero project. I can enter new entity through the generated interface with no problem, but an Automapper exception is thrown when attempting to edit the entity. The problem appears to be with the generated "CreateOrEdit" Dto. Here is exception (without full stacktrace) showing in log:
ERROR 2019-07-26 11:55:26,310 [121 ] Mvc.ExceptionHandling.AbpExceptionFilter - Missing type map configuration or unsupported mapping. Mapping types: Trainee -> CreateOrEditTraineeDto NexusApps.TrainingManager.Trainee -> NexusApps.TrainingManager.Dtos.CreateOrEditTraineeDto AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping. Mapping types: Trainee -> CreateOrEditTraineeDto NexusApps.TrainingManager.Trainee -> NexusApps.TrainingManager.Dtos.CreateOrEditTraineeDtoMarkdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Confirmed that the order of the mapping in the "CreateMap" method written in CustomDtoMapper.cs by the Rad Power Tools has the Dto and Entity reversed, so either the order of the mapping needs to be changed to CreateMap<Entity,Dto> or add ".ReverseMap()". Hoping this can be fixed in the Power Tools quickly
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Any update?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@Mazharmig
Automapper 8.1.1 version modifies
CreateMissingTypeMaps, default isfalse.AutoMapper no longer creates maps automatically (CreateMissingTypeMaps and conventions) You will need to explicitly configure maps, manually or using reflection. Also consider attribute mapping. https://docs.automapper.org/en/latest/Attribute-mapping.html
see: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4724#issuecomment-515679300
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I am using ReverseMap() right now and its working fine. I am waiting for RAD Tool update now. Can u please update Rad Tool so that it can append ReverseMap() in CustomDtoMapper. Thanks
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
