public bool dropCourse(Student student, Course course) { EfDelete data = new EfDelete(); Enrollment enroll = new Enrollment(); enroll.StudentID = student.StudentID; enroll.CourseName = course.CourseName; var enrollmentToDrop = db.Enrollments.FirstOrDefault(x => x.StudentID == enroll.StudentID && x.CourseName == enroll.CourseName); return(data.deleteEnrollment(enrollmentToDrop.EnrollmentID)); }
public bool CancelCourse(int id) { var data = new EfDelete(); return(data.deleteCourse(id)); }
public bool RemoveStudent(int id) { var data = new EfDelete(); return(data.deleteStudent(id)); }