public ActionResult AddCourse([FromBody] Course c) { if (CourseRepo.Add(c)) { return(Ok("The Course has been successfully added")); } return(BadRequest("The Course has already been added")); }
public IActionResult AddCourse([FromBody] CourseModel course) { if (CourseRepo.Add(course)) { return(Ok("Course successfully added.")); } else { return(BadRequest("This course already exists.")); } }