// GET: Employees/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Employee employee = db.Employees.Find(id); if (employee == null) { return(HttpNotFound()); } SmtpService.SendNotification("User updated"); populateEmployeeOptionsViewBag(id); return(View(employee)); }