Commit b7910ea4 authored by hasan khaddour's avatar hasan khaddour

fix s.

parent 1d5f4c82
......@@ -21,16 +21,10 @@ namespace PSManagement.Api.Mappers
CreateMap<UpdateCustomerCommand, UpdateCustomerRequest>().ReverseMap();
CreateMap<AddContactInfoRequest, AddContactInfoCommand>().ReverseMap();
CreateMap<AddressRecord, AddressDTO>().ReverseMap();
// CreateMap< IEnumerable<CustomerDTO>, ListCustomersResponse>().ma(src => src.Customers ,des => des.);
CreateMap<CustomerDTO, CustomerRecord>();
CreateMap<ContactInfoDTO, ContactInfoRecord>();
CreateMap<CustomerRecord, CustomerDTO>().ForMember(src =>src.ContactInfo , des => des.Ignore());
CreateMap<CustomerDTO, CustomerRecord>()
.ForMember(dest => dest.CustomerName, opt => opt.MapFrom(src => src.CustomerName))
.ForMember(dest => dest.Email, opt => opt.MapFrom(src => src.Email))
.ForMember(dest => dest.Address, opt => opt.MapFrom(src => src.Address));
CreateMap<IEnumerable<CustomerRecord>, ListCustomersResponse>()
.ConstructUsing(src => new ListCustomersResponse(src));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment