开发者

Automapper: change map behavior based on presence of custom attribute

Is it possible to have开发者_运维百科 AutoMapper look for an attribute on the source property? I want AutoMapper to change how it maps the properties when those properties have a specific attribute set.


There's nothing out of the box that allows you to do this. You will need to use reflection to read attributes for a given property and based on it's value adapt the mapping.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜