public async Task <OperationResult> Handle(RemoveRecursoProjetoCommand request, CancellationToken cancellationToken)
    {
        RecursoProjeto obj = await _unitOfWork.RecursoProjetoRepository.GetAsync(request.Id);

        if (obj == null)
        {
            return(OperationResult.NotFound);
        }

        await _unitOfWork.RecursoProjetoRepository.RemoveAsync(request.Id);

        bool success = await _unitOfWork.SaveChangesAsync();

        OperationResult result = success ? OperationResult.Success : OperationResult.Failed;

        return(result);
    }
 public async UnaryResult <OperationResult> RemoveAsync(RemoveRecursoProjetoCommand command)
 {
     return(await _mediator.Send(command));
 }