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