예제 #1
0
        public IHttpActionResult GetCourses(string semester = null)
        {
            List <CourseDTO> courseList = _service.GetCoursesBySemester(semester);

            if (courseList.Count() == 0)
            {
                return(NotFound());
            }

            return(Ok(courseList));
        }
예제 #2
0
 public IHttpActionResult GetCoursesBySemester(string semester)
 {
     return(Ok(_service.GetCoursesBySemester(semester)));
 }
예제 #3
0
 public List <CourseDTO> getCourses(string semester = null)
 {
     return(_service.GetCoursesBySemester(semester));
 }