Ejemplo n.º 1
0
        public async Task <ICommandResult> Handler(UpdateCommentCommandInput command)
        {
            var comment = await _COREP.GetById(command.CommentId);

            comment.Update(command.Title, command.Description);

            if (comment.Invalid)
            {
                return(new CommandResult(_BuildResult.BuildResult(comment.Notifications)));
            }

            _COREP.Update(comment);

            return(new CommandResult(new string[] { "Comentário atualizado com sucesso!" }));
        }
Ejemplo n.º 2
0
        public async Task <ICommandResult> Put([FromBody] UpdateCommentCommandInput value)
        {
            var result = await CommentHandler.Handler(value);

            return(result);
        }