public bool Delete(int id) { try { Nurse nurse = db.Nurse.Where(o => o.NurseId == id).First(); db.Remove(nurse); db.SaveChanges(); return(true); } catch (System.Exception) { return(false); } }