public List <Course> GetCourse(int uid) { StudentCS studentCS = new StudentCS(); CourseServiceDecorator courseServiceDecorator = new CourseServiceDecorator(studentCS); return(courseServiceDecorator.QueryCourse(uid)); }
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)); }