public IActionResult ByMake(string make) { var carsByMake = this.cars.ByMake(make); var carsByMakeViewModel = new CarsByMakeViewModel { Make = make, Cars = carsByMake }; return(View(carsByMakeViewModel)); }
public IActionResult AllByMake(string make) { IEnumerable <CarServiceModel> cars = this.carService.GetAllByMake(make); CarsByMakeViewModel model = new CarsByMakeViewModel { Make = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(make.ToLower()), Cars = cars }; return(View(model)); }