public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Story story = storyManager.Find(x => x.Id == id.Value); if (story == null) { return(HttpNotFound()); } return(View(story)); }