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 :(
精彩评论