public IActionResult Index()
        {
            var viewModel = new ServiceCategoriesViewModel()
            {
                ServiceCategories = _dataManager.ServiceCategories.GetServiceCategories().ToList()
            };

            return(View(viewModel));
        }
예제 #2
0
        public IActionResult ListServiceCategories(int carId)
        {
            var repairsCount = this.repairServices.GetAllRepairsForCarWithId(carId).Count();

            var serviceCategoriesViewModel = new ServiceCategoriesViewModel()
            {
                RepairsCount = repairsCount
            };

            this.ViewData["carId"] = carId;

            return(this.View(serviceCategoriesViewModel));
        }