public static CourseSection getCourseAndSections(int? id) { BasicSchoolDbContext db = new BasicSchoolDbContext(); CourseSection courseSection = new CourseSection(); courseSection.course = getCourse(id); var sections = db.Sections.Where(s => s.CourseNumber == courseSection.course.CourseNumber); courseSection.sections = sections.ToList(); return courseSection; }
public static CourseSection getCourseAndSections(int?id) { CourseSection courseSection = BasicSchool.getCourseAndSections(id); return(courseSection); }