public ActionResult Edit([Bind(Include = "PatientId,Name")] PatientViewModel pvm) { IBL bl = new BLImplement(); try { var patient = new Patient() { PatientId = pvm.PatientId, Name = pvm.Name }; bl.updatePatient(patient); ViewBag.Message = String.Format("The patient {0} is successfully updated", pvm.Name); } catch (Exception ex) { ViewBag.Message = String.Format(ex.Message); return(View("Edit")); } return(View("Index")); }