public bool InsertProfessor(Professor professor) { db.Professors.Add(professor); return(db.SaveChanges() > 0); }
public bool RemoveProfessor(Professor professor) { db.Professors.Remove(professor); return(db.SaveChanges() > 0); }
public bool DeleteProfessor(Professor professor, int?id) { professor = db.Professors.Where(x => x.ProfessorID == id).FirstOrDefault(); db.Professors.Remove(professor); return(db.SaveChanges() > 0); }