예제 #1
0
        public async Task <ActionResult> SearchCars(string make = null, string model = null, int?year = null, string color = null)
        {
            var cars = await _carClient.GetCar(make, model, year, color);

            var mappedCars = cars.Select(t => new CarViewModel {
                Make  = t.Make,
                Model = t.Model,
                Year  = t.Year,
                Color = t.Color
            }).ToList();

            return(View("Results", mappedCars));
        }
예제 #2
0
        public async Task <ActionResult> GetCar(CarViewModel car)
        {
            var car1 = await _carClient.GetCar();

            return(View(car1));
        }