public ActionResult DeleteConfirmed(int id) { var thisPatient = _db.Patients.FirstOrDefault(patients => patients.PatientId == id); _db.Remove(thisPatient); return(RedirectToAction("Index")); }
public ActionResult ConfrimDelete(int id) { var thisDoctor = _db.Doctors.FirstOrDefault(doctor => doctor.DoctorId == id); _db.Remove(thisDoctor); _db.SaveChanges(); return(RedirectToAction("Index")); }