示例#1
0
        public static Course getCourse(int?id)
        {
            BasicSchoolDBContext db = new BasicSchoolDBContext();
            Course course           = db.courses.Find(id);

            return(course);
        }
示例#2
0
        public static List <Course> getAllCourses()
        {
            BasicSchoolDBContext db = new BasicSchoolDBContext();

            return(db.courses.ToList());
        }