public async Task HandleAsync(MarkTasksBugAsDone command) { var task = await taskRepository.GetAsync(command.TaskId); var originalVersion = task.Version; await task.MarkBugAsDone(command.IssueId, callContext.UserId, authorizationService); var bug = task.Bugs.Single(x => x.Id == command.IssueId); await taskRepository.UpdateChildEntity(task, originalVersion, bug); }
public async Task <IActionResult> MarkBugAsDone([FromRoute] Guid projectId, [FromRoute] Guid taskId, [FromRoute] Guid bugId, [FromBody] MarkTasksBugAsDone command) { command.ProjectId = projectId; command.TaskId = taskId; command.IssueId = bugId; await commandQueryBus.SendAsync(command); return(Ok()); }