コード例 #1
0
        public IList <Course> ListCourseByUserId(long userId)
        {
            if (userId < 0)
            {
                throw new ArgumentException();
            }
            List <Course> courseList = _iCourseDao.ListCourseByUserId(userId);

            //查不到课程
            return(courseList);
        }
コード例 #2
0
ファイル: CourseService.cs プロジェクト: lucity/Xmu.Crms
 public IList <Course> ListCourseByUserId(long userId)
 {
     try
     {
         if (userId < 0)
         {
             throw new ArgumentException();
         }
         List <Course> courseList = _iCourseDao.ListCourseByUserId(userId);
         //查不到课程
         if (courseList == null || courseList.Count == 0)
         {
             throw new CourseNotFoundException();
         }
         return(courseList);
     }
     catch
     {
         throw;
     }
 }