You can use the ignore method for associations that you do not need to load.
Mapper.CreateMap<User, UserDto>() .ForMember(dest => dest.LazyCollection, opt => opt.Ignore()) .ForMember(dest => dest.AnotherLazyCollection, opt => opt.Ignore()) Mapper.CreateMap<UserProperty, UserPropertyDto>() .ForMember(dest => dest.PropertyLazyReference, opt => opt.Ignore()); return Mapper.Map<User, UserDto>(user);
For associations that you know you'll need in your dto, you should take a look at ways to collect them more efficiently with the original query, but this is a completely new problem.
source share