How can I ignore mapping if property type is different with same property name?
By default it's throwing error.
Mapper.CreateMap<EntityAttribute, LeadManagementService.LeadEntityAttribute>();
Model = Mapper.Map<EntityAttribute, LeadManagementService.LeadEntityAttribute>(EntityAttribute);
I know a way to specify the property name to ignore but that's not what I want.
.ForMember(d=>d.Field, m=>m.Ignore());
Because in the future I might add new properties. So i need to ignore mapping for all properties with different data types.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…