public IActionResult Index() { var viewModel = new ServiceCategoriesViewModel() { ServiceCategories = _dataManager.ServiceCategories.GetServiceCategories().ToList() }; return(View(viewModel)); }
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)); }