Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            var thisPatient = _db.Patients.FirstOrDefault(patients => patients.PatientId == id);

            _db.Remove(thisPatient);
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public ActionResult ConfrimDelete(int id)
        {
            var thisDoctor = _db.Doctors.FirstOrDefault(doctor => doctor.DoctorId == id);

            _db.Remove(thisDoctor);
            _db.SaveChanges();
            return(RedirectToAction("Index"));
        }