// GET: /Vendor/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Vendor vendor = _vendorManager.GetById((int)id); if (vendor == null) { return(HttpNotFound()); } return(View(vendor)); }