// GET: Routes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Route route = _routeService.FindById(id); if (route == null) { return(HttpNotFound()); } return(View(route)); }