public IActionResult AcceptRequestedCourse(int id) { if (ModelState.IsValid) { var result = repository.AcceptRequestedCourse(id); if (!result.Any()) { return(NoContent()); } return(Ok(result)); } return(BadRequest(ModelState)); }