// GET: Admin/FlatTypes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } FlatType flatType = m_repo.GetFlatType(id.Value); if (flatType == null) { return(HttpNotFound()); } return(View(flatType)); }