示例#1
0
        public async Task <IActionResult> PostComment(string app, DomainId commentsId, [FromBody] UpsertCommentDto request)
        {
            var command = request.ToCreateCommand(commentsId);

            await CommandBus.PublishAsync(command);

            var response = CommentDto.FromDomain(command);

            return(CreatedAtAction(nameof(GetComments), new { app, commentsId }, response));
        }