public async Task HandleAsync(CommentNfrsBug command) { var nfr = await nfrRepository.GetAsync(command.NfrId); var originalVersion = nfr.Version; await nfr.CommentBug(command.IssueId, callContext.UserId, command.Content, authorizationService); var bug = nfr.Bugs.Single(x => x.Id == command.IssueId); await nfrRepository.UpdateChildEntity(nfr, originalVersion, bug); }
public async Task <IActionResult> CommentBug([FromRoute] Guid projectId, [FromRoute] Guid nfrId, [FromRoute] Guid bugId, [FromBody] CommentNfrsBug command) { command.ProjectId = projectId; command.NfrId = nfrId; command.IssueId = bugId; await commandQueryBus.SendAsync(command); return(Ok()); }