public async Task <ItineraryPersistenceModel> FindItinerary(string cartId, CancellationToken cancellationToken)
 {
     return((await _sqlServerProvider.Query <ItineraryIdParams, ItineraryPersistenceModel>("GetItineraryById", new ItineraryIdParams()
     {
         Id = Guid.Parse(cartId)
     }, cancellationToken)).FirstOrDefault());
 }
Пример #2
0
 public async Task <CarModel> FindCar(int carId, CancellationToken cancellationToken)
 {
     return(await ResolveAirport((await _sqlServerProvider.Query <SQLServerFindByIdParam, CarModel>("FindCarById",
                                                                                                    new SQLServerFindByIdParam()
     {
         Id = carId
     },
                                                                                                    cancellationToken)).FirstOrDefault(), cancellationToken));
 }
Пример #3
0
 public async Task <AirportModel> FindByCode(string airportCode, CancellationToken cancellationToken)
 {
     return((await _sqlServerProvider.Query <FindAiportByCodeParams, AirportModel>("FindAirportByCode",
                                                                                   new FindAiportByCodeParams()
     {
         AirportCode = airportCode
     },
                                                                                   cancellationToken)).FirstOrDefault());
 }
Пример #4
0
 public async Task <FlightModel> FindFlight(int flightId, CancellationToken cancellationToken)
 {
     return(await ResolveAirport((await _sqlServerProvider.Query <SQLServerFindByIdParam, FlightModel>("FindFlightById",
                                                                                                       new SQLServerFindByIdParam()
     {
         Id = flightId
     },
                                                                                                       cancellationToken)).FirstOrDefault(), cancellationToken));
 }
Пример #5
0
 public async Task <CartPersistenceModel> GetCart(string cartId, CancellationToken cancellationToken)
 {
     return((await _sqlServerProvider.Query <CartIdParams, CartPersistenceModel>("GetCartById", new CartIdParams()
     {
         Id = Guid.Parse(cartId)
     }, cancellationToken)).FirstOrDefault());
 }