Пример #1
0
        public async Task <ActionResult <IEnumerable <ReservationResponse> > > GetReservations()
        {
            var query  = new GetRezervationsWithProductsQuery();
            var orders = await _mediator.Send(query);

            return(Ok(orders));
        }
Пример #2
0
        public async Task <IEnumerable <ReservationResponse> > Handle(GetRezervationsWithProductsQuery request, CancellationToken cancellationToken)
        {
            var reservationList = await _repository.GetRezervationsWithProducts();

            var reservationResponseList = ReservationMapper.Mapper.Map <IEnumerable <ReservationResponse> >(reservationList);

            return(reservationResponseList);
        }