public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Employee employee = db.Employees.Find(id); if (employee == null) { return(HttpNotFound()); } EditEmployee modal = new EditEmployee(); modal.Fill(employee); return(View(modal)); }