// GET: Accounts/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Account account = ac.AccountById(id.Value); if (account == null) { return(HttpNotFound()); } return(View(account)); }