Override type mapping in AutoMapper
I've got the following...
Mapper.CreateMap<string, string>().ConvertUsing(x => x.Clean());
...but I only want to use this mapping when mapping between some types. If this mapping were to be the defaul开发者_运维技巧t, how could I override it for selected types?
Cheers, Ian.
Ok, new try ;)
Maybe you could use Ignore() If() and Skip() to achieve your goal. If you can figure out from the string what you should do with it.
Bit like in this question: Automapper: Ignore on condition of
精彩评论