开发者

AutoMapper's Ignore() not working?

I'm trying to ignore a property from my type when performing mapping using AutoMapper. I def开发者_Go百科ine mapping this way:

Mapper.CreateMap<TypeA, TypeA>().ForMember(dest => dest.Id, opt => opt.Ignore());

Both source and destination are the same types. When I call Map function, destination's Id property gets updated anyway. I'm using the latest version downloaded from CodePlex.


Sorry guys, it was my stupid fault. That's why one should not work at 4 am :(

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜