public async Task <OperationResult> Handle(RemoveRecursoCommand request, CancellationToken cancellationToken)
    {
        Recurso obj = await _unitOfWork.RecursoRepository.GetAsync(request.Id);

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

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

        bool success = await _unitOfWork.SaveChangesAsync();

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

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