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); }
public static CourseSection getCourseAndSections(int?id) { CourseSection courseSection = BasicStudent.getCourseAndSections(id); return(courseSection); }