public async Task HandleAsync(CommentBug command) { var Bug = await bugRepository.GetAsync(command.IssueId); var version = Bug.Version; await Bug.Comment(callContext.UserId, command.Content, authorizationService); await bugRepository.Update(Bug, version); }
public async Task <IActionResult> Comment([FromRoute] Guid projectId, [FromRoute] Guid bugId, [FromBody] CommentBug command) { command.ProjectId = projectId; command.IssueId = bugId; await commandQueryBus.SendAsync(command); return(Ok()); }