示例#1
0
        public List <Course> GetCourse(int uid)
        {
            StudentCS studentCS = new StudentCS();
            CourseServiceDecorator courseServiceDecorator = new CourseServiceDecorator(studentCS);

            return(courseServiceDecorator.QueryCourse(uid));
        }
示例#2
0
        public IActionResult DeleteNew(int user_id, int course_id)
        {
            StudentCS studentCS = new StudentCS();
            CourseServiceDecorator courseServiceDecorator = new CourseServiceDecorator(studentCS);
            Course course = new Course();

            course = MysqlClient.getCourseById(course_id);
            courseServiceDecorator.DeleteCourse(user_id, course);
            return(Ok(db.Scourses));
        }