Ejemplo n.º 1
0
        //Get all list of cars
        public IEnumerable <CarViewModel> GetAll()
        {
            IEnumerable <CarDTO> phoneDtos = auctionService.GetAllCheckedCars();
            var mapper   = new MapperConfiguration(cfg => cfg.CreateMap <CarDTO, CarViewModel>()).CreateMapper();
            var services = mapper.Map <IEnumerable <CarDTO>, List <CarViewModel> >(phoneDtos);

            return(services);
        }