Example #1
0
        public async Task HandleAsync(MarkBugAsDone command)
        {
            var Bug = await bugRepository.GetAsync(command.IssueId);

            var originalVersion = Bug.Version;
            await Bug.MarkAsDone(callContext.UserId, authorizationService);

            await bugRepository.Update(Bug, originalVersion);
        }
Example #2
0
        public async Task <IActionResult> MarkAsDone([FromRoute] Guid projectId, [FromRoute] Guid bugId, [FromBody] MarkBugAsDone command)
        {
            command.ProjectId = projectId;
            command.IssueId   = bugId;
            await commandQueryBus.SendAsync(command);

            return(Ok());
        }