We refact all code where use AutoMapper.Map with ObjectMapper.Map, so we have some CustomDto, registered via CustomDtoMapper that use AutoMapper.Map or Abp MapTo Extension.
The first option is map all properties one by one but is there a way to use a map to do that?
For example suppose to have Cusotmer & CustomerDto, this is mapped via CustomDto, and you add OrderDataDto with a property Customer type CustomerDto in this context we use cutomerBase.MapTo<CustomerDto>()
2 Answer(s)
-
0
Please do not use static MapTo extension methods, always use ObjectMapper.
The first option is map all properties one by one but is there a way to use a map to do that?
It seems that there is no.
For more information, please refer to the Automapper documentation. Especially the recent breaking change. http://docs.automapper.org/en/stable/index.html https://github.com/AutoMapper/AutoMapper/releases
-
0
Hi maliming
sorry for the delay.
Thanks for your response, we move our CustomDto with manual mapping.
Regards