// GET: Reportings/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Reporting reporting = repo.Get(id.Value); if (reporting == null) { return(HttpNotFound()); } return(View(reporting)); }