コード例 #1
0
        public static CourseSection getCourseAndSections(int?id)
        {
            BasicStudentDbContext db            = new BasicStudentDbContext();
            CourseSection         courseSection = new CourseSection();

            courseSection.course = db.courses.Find(id);

            var sections = db.sections.Where(s => s.courseNumber == courseSection.course.courseNumber);

            courseSection.sections = sections.ToList();

            return(courseSection);
        }
コード例 #2
0
        public static CourseSection getCourseAndSections(int?id)
        {
            CourseSection courseSection = BasicStudent.getCourseAndSections(id);

            return(courseSection);
        }