public ActionResult EditStatus(string status) { Status s = statusRepo.FindStatus(status); if (s == null) { TempData["error"] = "Something whent wrong. Please contact the IT department."; return(RedirectToAction("Index")); } StatusViewModel svm = new StatusViewModel(s); return(View(svm)); }