public IActionResult AddCourseSection(int CrsId, CourseSection courseSection) { if (CrsId > 0) { IEnumerable <CourseSection> CrsSections = _db.AddCourseSection(CrsId, courseSection); if (CrsSections != null) { return(Ok(CrsSections)); } return(BadRequest("Error")); } return(BadRequest("Error")); }