// GET: Step/Details/{id} public ActionResult Details(int id) { var service = new StepService(); try { var model = service.GetStepById(id); return(View(model)); } catch (InvalidOperationException) { TempData["NoResult"] = "The Step could not be found."; return(RedirectToAction("Index")); } }