public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Incident incident = incidentManager.Find(x => x.Id == id); if (incident == null) { return(HttpNotFound()); } return(View(incident)); }