Основные методы
Основные методы
Основные методы
Основные методы
public async Task <IActionResult> AssignUsers([FromRoute] Guid taskId, [FromBody] AssignTaskRequest request) { var result = _requestValidator.Validate(request); if (!result.IsValid) { throw new InvalidValueException(result.Errors.Select(e => e.ErrorMessage).Distinct().ToArray()); } var(Assigned, NotAssigned) = await _tasksService.AssignUsers(taskId, request.UsersToAssign, request.UsersToUnssign); return(Ok(new AssignTaskResponse() { UsersAssigned = Assigned, UsersNotAssigned = NotAssigned })); }