public void AddSubjectForProfessor(Professor professor, Subject subject) { _db.Professors.Attach(professor); _db.Subjects.Attach(subject); professor.Subjects.Add(subject); _db.SaveChanges(); }
public void UpdateProfessor(Professor professor) { _db.Professors.Attach(professor); _db.SaveChanges(); }
public void InsertProfessor(Professor professor) { _db.Professors.Add(professor); _db.SaveChanges(); }