KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm using automapper and I would like to know if it's possible to ignore a mapping of a field when that's null. That's my code: .ForMember(dest => dest.BusinessGroup_Id, opt => opt.MapFrom(src => (int)src.BusinessGroup)) src.BusinessGroup type = "enum" dest.BusinessGroup_Id = int The objective it's to ingore that Mapping if src.BusinessGroup = null.
Tags (comma-separated)
Save Edits
Cancel