public ActionResult Details(int id) { var model = db.Get(id); if (model == null) { return(View("NotFound")); } return(View(model)); }
public ActionResult Details(int id) { Person model = new Person(); try { model = db.Get(id); CheckForNullPerson(model); } catch (ArgumentException e) { Log.Error(Helper.NOT_FOUND, e); return(View("NotFound")); } catch (Exception e) { Log.Fatal(Helper.FATAL_ERROR, e); return(View("Error")); } return(View("Details", model)); }