public async Task <Response <Exception, IQueryable <Rental> > > Handle(RentalGetAllQuery request, CancellationToken cancellationToken) { return(await Task.FromResult(_rentalRepository.GetAll())); }
public async Task <IActionResult> GetAll() { var rentalGetAllQuery = new RentalGetAllQuery(); return(HandleQueryable <Rental, RentalsGetAllViewModel>(await _mediator.Send(rentalGetAllQuery))); }