public async Task <IActionResult> AssignTask([FromRoute] int id, [FromBody] int userID) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var result = await _tasksRepository.AssignToUser(id, userID); if (result == true) { return(Ok(result)); } return(NoContent()); }