public IHttpActionResult GetCourses(string semester = null) { List <CourseDTO> courseList = _service.GetCoursesBySemester(semester); if (courseList.Count() == 0) { return(NotFound()); } return(Ok(courseList)); }
public IHttpActionResult GetCoursesBySemester(string semester) { return(Ok(_service.GetCoursesBySemester(semester))); }
public List <CourseDTO> getCourses(string semester = null) { return(_service.GetCoursesBySemester(semester)); }