--
You received this message because you are subscribed to the Google Groups "AutoMapper-users" group.
To post to this group, send email to automapp...@googlegroups.com.
To unsubscribe from this group, send email to automapper-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/automapper-users?hl=en.
To unsubscribe from this group and stop receiving emails from it, send an email to automapper-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public static PersonEditVM GetAutoMappedPersonEditVM(Guid personID) { IMapper mapper = MapperConfig.EntityWebMapper;
Person person = personID == Guid.Empty ? new Person() : CrmRepository.GetPersonWithContactInfo(personID);
PersonEditVM vm = mapper.Map<PersonEditVM>(person);
vm.AvailableStates = mapper.Map<List<StateModel>>(CrmRepository.GetStates()) .OrderBy(s => s.Name) .ToList();
vm.AvailablePhoneTypes = mapper.Map<List<PhoneTypeModel>>(CrmRepository.GetPhoneTypes()) .OrderBy(pt => pt.Name) .ToList();
return vm; }
To unsubscribe from this group and stop receiving emails from it, send an email to automapper-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have a Flat destination class and a complex source containing
multiple child objects
Currently I create multiple maps with the same output type but
different input types.