Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public bool CancelCourse(int id)
        {
            var data = new EfDelete();

            return(data.deleteCourse(id));
        }
Exemplo n.º 3
0
        public bool RemoveStudent(int id)
        {
            var data = new EfDelete();

            return(data.deleteStudent(id));
        }