Beispiel #1
0
        public async Task HandleAsync(CommentTasksBug command)
        {
            var task = await taskRepository.GetAsync(command.TaskId);

            var originalVersion = task.Version;
            await task.CommentBug(command.IssueId, callContext.UserId, command.Content, authorizationService);

            var bug = task.Bugs.Single(x => x.Id == command.IssueId);
            await taskRepository.UpdateChildEntity(task, originalVersion, bug);
        }
        public async Task <IActionResult> CommentBug([FromRoute] Guid projectId, [FromRoute] Guid taskId, [FromRoute] Guid bugId, [FromBody] CommentTasksBug command)
        {
            command.ProjectId = projectId;
            command.TaskId    = taskId;
            command.IssueId   = bugId;
            await commandQueryBus.SendAsync(command);

            return(Ok());
        }