public void Delete(int id) { Teacher t = context.Teachers.FirstOrDefault(s => s.Id == id); if (t != null) { context.Teachers.Remove(t); context.SaveChanges(); } }
public void Delete(int id) { Student s = context.Students.FirstOrDefault(s => s.Id == id); if (s != null) { context.Students.Remove(s); context.SaveChanges(); } }
public void Delete(StudentCourse studentCourse) { context.StudentCourse.Remove(studentCourse); context.SaveChanges(); }