// GET: Employees/Details/5 public ActionResult Details(int id) { if (id == 0) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Employee employee = objects.FindEmployee(id); if (employee == null) { return(HttpNotFound()); } return(View(employee)); }