// GET: Patients/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } IBL bL = new BlClass(); Patient patient = bL.GetPatient(id); if (patient == null) { return(HttpNotFound()); } return(View(new PatientVM(patient))); }