Exemple #1
0
        public IActionResult AllByMake(string make)
        {
            var cars = this.carService.AllByMake(make);

            var model = new CarsByMakeModel
            {
                Make = make ?? All,
                Cars = cars
            };

            return(this.View(model));
        }
        public IActionResult ByMake(string make)
        {
            var makeFilter = make.ToLower() == All ? null : make;

            var cars = this.carService.AllByMake(makeFilter);

            var model = new CarsByMakeModel
            {
                Cars = cars,
                Make = make
            };

            return(this.View(model));
        }