public IActionResult GetAllCourseSections(int courseId) { if (courseId > 0) { IEnumerable <CourseSection> sections = _db.AllCourseSectionsInSpecificCourse(courseId); if (sections != null) { return(Ok(sections)); } } return(BadRequest("Something went wrong")); }