Issue with ignoring base class property in child classes mappings using Automapper
问题 I have a scenario where I would like to ignore some properties of classes defined in base class. I have an initial mapping like this Mapper.CreateMap<Node, NodeDto>() .Include<Place, PlaceDto>() .Include<Asset, AssetDto>(); Then I customised it more like this to ignore one of the properties defined in base class NodeDto Mapper.CreateMap<Node, NodeDto>() .ForMember(dest => dest.ChildNodes, opt => opt.Ignore()); However when I try to map, Place to PlaceDto or Asset to AssetDto, the ChildNodes