コード例 #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));
        }
コード例 #2
0
        public bool CancelCourse(int id)
        {
            var data = new EfDelete();

            return(data.deleteCourse(id));
        }
コード例 #3
0
        public bool RemoveStudent(int id)
        {
            var data = new EfDelete();

            return(data.deleteStudent(id));
        }