常用方法
常用方法
常用方法
常用方法
public IEnumerable <CarViewModel> GetAllUniversals() { IEnumerable <CarDTO> phoneDtos = auctionService.GetAllUniversals(); var mapper = new MapperConfiguration(cfg => cfg.CreateMap <CarDTO, CarViewModel>()).CreateMapper(); var services = mapper.Map <IEnumerable <CarDTO>, List <CarViewModel> >(phoneDtos); return(services); }