コード例 #1
0
 public async Task <Response <Exception, IQueryable <Rental> > > Handle(RentalGetAllQuery request, CancellationToken cancellationToken)
 {
     return(await Task.FromResult(_rentalRepository.GetAll()));
 }
コード例 #2
0
        public async Task <IActionResult> GetAll()
        {
            var rentalGetAllQuery = new RentalGetAllQuery();

            return(HandleQueryable <Rental, RentalsGetAllViewModel>(await _mediator.Send(rentalGetAllQuery)));
        }