Is there a provision in Automapper to ignore certain properties while mapping. For example, I have two classes Manager and Employee. Manager has a list of employees and other information.
I need employees list in Manager most of the times but in few cases I do not need employees list to be returned to the client (say while just editing manager names). So, when I create map, I included Employees to be mapped too. Now is there a way to specify employees property to be ignored at the time of mapping.
// <--- Employees is included.
Mapper.CreateMap<Manager, ManagerDto>();
// <--- I want to ignore employees list here.
ManagerDto dto = Mapper.Map<Manager, ManagerDto>(manager);