public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Menus menus = menusHandler.GetById(id); if (menus == null) { return(HttpNotFound()); } return(View(menus)); }