public ActionResult DeleteConfirmed(int id) { PatientEntity patientEntity = db.Find(id); db.Remove(patientEntity); return(RedirectToAction("Index")); }
public IHttpActionResult DeletePatientEntity(int id) { PatientEntity patientEntity = db.Find(id); if (patientEntity == null) { return(NotFound()); } db.Remove(patientEntity); return(Ok(patientEntity)); }