Ejemplo n.º 1
0
        public async Task <ICollection <DeliveryCarViewModel> > MapCarsAsync(DeliveryCarsViewModel model)
        {
            var car = this.carRepository.All().ToList();

            model.DeliveryCars = this.mapper.Map <ICollection <DeliveryCarViewModel> >(car);

            return(await Task.FromResult <ICollection <DeliveryCarViewModel> >(model.DeliveryCars));
        }
        public async Task <IActionResult> Cars(DeliveryCarsViewModel model)
        {
            model.DeliveryCars = await this.carService.MapCarsAsync(model);

            return(this.View(model));
        }