Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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());
        }