예제 #1
0
        public async Task <CartPersistenceModel> UpsertCartCar(string cartId, int carId, double numberOfDays, CancellationToken cancellationToken)
        {
            await _sqlServerProvider.Execute <UpdateCartCarParms>("UpsertCartCar", new UpdateCartCarParms()
            {
                Id                     = Guid.Parse(cartId),
                CarReservation         = _sqlServerProvider.NullIfZero(carId),
                CarReservationDuration = _sqlServerProvider.NullIfZero(numberOfDays)
            }, cancellationToken);

            return(await GetCart(cartId, cancellationToken));
        }
 public async Task UpsertItinerary(ItineraryPersistenceModel itinerary, CancellationToken cancellationToken)
 {
     await _sqlServerProvider.Execute <ItineraryUpsertParams>("UpsertItinerary", new ItineraryUpsertParams()
     {
         Id = Guid.Parse(itinerary.Id),
         DepartingFlight          = _sqlServerProvider.NullIfZero(itinerary.DepartingFlight),
         ReturningFlight          = _sqlServerProvider.NullIfZero(itinerary.ReturningFlight),
         CarReservation           = _sqlServerProvider.NullIfZero(itinerary.CarReservation),
         CarReservationDuration   = _sqlServerProvider.NullIfZero(itinerary.CarReservationDuration),
         HotelReservation         = _sqlServerProvider.NullIfZero(itinerary.HotelReservation),
         HotelReservationDuration = _sqlServerProvider.NullIfZero(itinerary.HotelReservationDuration),
         RecordLocator            = itinerary.RecordLocator,
         PurchasedOn = itinerary.PurchasedOn
     }, cancellationToken);
 }