'Automapper - Does it map lists of objects?
I have the following Automapper defintion:
Mapper.CreateMap<IB.BusinessComponents.Data.LocationMaster, IB.Entites.Master.Location>();
Mapper.CreateMap<IB.BusinessComponents.Data.LocationMaster, IB.Entites.Master.Location>()
.ForMember(destination => destination.Id, source => source.MapFrom(item => item.LocationMasterID))
.ForMember(destination => destination.ChildLocationList, source => source.Ignore());
This works fine when I map a single object. But I can't seem to pass in Lists of objects. Do I need a different definition when passing in a list, or is it not possible?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
