开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜