Beispiel #1
0
        public async Task Purchase(FlightReservationModel flight, CancellationToken cancellationToken)
        {
            string cartId      = _cartCookieProvider.GetCartCookie();
            var    updatedCart = await _cartDataProvider.UpsertCartFlights(cartId, flight.SelectedDepartingFlight, flight.SelectedReturningFlight, cancellationToken);

            if (string.IsNullOrEmpty(cartId))
            {
                _cartCookieProvider.SetCartCookie(updatedCart.Id);
            }
        }
        public async Task Purchase(CarReservationModel car, CancellationToken cancellationToken)
        {
            string cartId      = _cartCookieProvider.GetCartCookie();
            var    updatedCart = await _cartDataProvider.UpsertCartCar(cartId, car.SelectedCar, car.NumberOfDays, cancellationToken);

            if (string.IsNullOrEmpty(cartId))
            {
                _cartCookieProvider.SetCartCookie(updatedCart.Id);
            }
        }