public ActionResult Update(int id) { SubCategory subCategory = productionService.GetSubCategory(id); ViewData["IsUpdate"] = true; ViewData["Categories"] = productionService.GetCategories().ToSelectListItems(x => x.Id, x => x.Name); return(View("CreateOrEdit", subCategory)); }