// GET: Employees/Details/5 public ActionResult Details(int?id) { if (!id.HasValue) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Employee employee = p_repo.GetEmployee(id.Value); if (employee == null) { return(HttpNotFound()); } return(View(employee)); }