public async Task <IActionResult> GetByCustomerCpf(string cpf)
        {
            var rentalGetByCustomerCpfQuery = new RentalGetByCustomerCpfQuery {
                Cpf = cpf
            };

            return(HandleQueryable <Rental, RentalsGetByCustomerCpf>(await _mediator.Send(rentalGetByCustomerCpfQuery)));
        }
 public async Task <Response <Exception, IQueryable <Rental> > > Handle(RentalGetByCustomerCpfQuery request, CancellationToken cancellationToken)
 {
     return(await Task.FromResult(_rentalRepository.GetByCustomerCPF(request.Cpf)));
 }