How to stop Automapper from mapping to parent class when child class was requested
问题 I am working on implementing AutoMapper in our service and am seeing a very confusing issue in our unit tests. First off this issue involves the following objects and their respective maps: public class DbAccount : ActiveRecordBase<DbAccount> { // this is the ORM entity } public class Account { // this is the primary full valued Dto } public class LazyAccount : Account { // this class as it is named doesn't load the majority of the properties of account } Mapper.CreateMap<DbAccount,Account>()