Example #1
0
        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);
        }