public ActionResult Save(ServiceModel service) { if (!ModelState.IsValid) { ServiceViewModel model = new ServiceViewModel() { Service = service, Categories = _categoryRepo.Get() }; return(View("ServiceForm", model)); } try { _serviceRepo.AddOrUpdate(service); } catch (Exception e) { return(HttpNotFound()); } if (service.Id == 0) { return(RedirectToAction("Index", "Service")); } return(RedirectToAction("Show", new { id = service.Id })); }