// GET: CarTypes
        public IActionResult Index()
        {
            var model = new CarTypeListViewModel {
                CarTypes = new List <CarTypeViewModel>()
            };

            model.CarTypes.AddRange(dbService.AllCarTypesWithCars().Select(ConvertToCarType).ToList());
            return(View(model));
        }
        public IActionResult Index()
        {
            var model = new CarTypeListViewModel {
                Brands = new List <CarTypeDetailViewModel>()
            };

            model.Brands.AddRange(_carService.GetAllBrands().Select(ConvertToBrandDetailViewModel).ToList());
            return(View(model));
        }
        public IActionResult CarTypes()
        {
            var model = new CarTypeListViewModel {
                CarTypes = new List <CarTypeDetailViewModel>()
            };
            var allCarTypes = _carService.GetAllCarTypes();

            model.CarTypes.AddRange(allCarTypes.Select(ConvertCarTypeToCarTypeDetailViewModel).ToList());
            return(View(model));
        }