public List <Course> GetCourses() { List <Course> courseList; try { courseList = new CourseRepo().GetCourses(); if (courseList.Any()) { return(courseList); } else { throw new PrometheusException("No Courses Found!"); } } catch (Exception) { throw; } }
// Can be moved to CourseBL // Returns List of Courses public List <Course> GetCoursesAsList() { List <Course> CourseList; try { CourseList = new CourseRepo().GetCourses(); if (CourseList.Any()) { return(CourseList); } else { throw new PrometheusException("No Courses Found!"); } } catch (Exception ex) { throw new PrometheusException(ex.Message); } }