public async Task <Unit> Handle(InserirComentarioCommand command, CancellationToken cancellationToken)
        {
            var comentario = new ComentarioProjeto(command.Conteudo, command.IdProjeto, command.IdUsuario);

            await _repository.InserirComentarioAsync(comentario);

            return(Unit.Value);
        }
示例#2
0
        public async Task InserirComentarioAsync(ComentarioProjeto comentarioProjeto)
        {
            await _dbContext.Comentarios.AddAsync(comentarioProjeto);

            await _dbContext.SaveChangesAsync();
        }