public async Task <Course> GetCourseByCourseIdAsync(long courseId) { if (courseId < 0) { throw new ArgumentException(); } var course = await _iCourseDao.GetCourseByCourseIdAsync(courseId); //没查到该门课 if (course == null) { throw new CourseNotFoundException(); } return(course); }