thamaraaalves
1/10/2019 - 11:47 AM

AutoMappers


var config = new MapperConfiguration(cfg => {
	cfg.CreateMap<AuthorDTO, AuthorModel>()
	   .ForMember(destination => destination.Address,
  map => map.MapFrom(
  source => new Address
  {
	  City = source .City,
	  State = source .State,
	  Country = source.Country

  }));