开发者

AutoMapper Exclude Fields

I'm trying to map one object to another but the object is quite complex. During development, I'd like the ability to either exclude a bunch of fields and get to them one by one or be able to specify to map only field开发者_开发问答s I want and increase that as each test succeeds.

So:

class    
    string field1    
    string field2    
    string field3

Now I'd like to map field1, test, fix and then move onto field2 then field3.

Is this possible?


.ForMember(dto => dto.field1, opt => opt.Ignore());
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜