public async Task <ItineraryPersistenceModel> FindItinerary(string cartId, CancellationToken cancellationToken) { return((await _sqlServerProvider.Query <ItineraryIdParams, ItineraryPersistenceModel>("GetItineraryById", new ItineraryIdParams() { Id = Guid.Parse(cartId) }, cancellationToken)).FirstOrDefault()); }
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)); }
public async Task <AirportModel> FindByCode(string airportCode, CancellationToken cancellationToken) { return((await _sqlServerProvider.Query <FindAiportByCodeParams, AirportModel>("FindAirportByCode", new FindAiportByCodeParams() { AirportCode = airportCode }, cancellationToken)).FirstOrDefault()); }
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)); }
public async Task <CartPersistenceModel> GetCart(string cartId, CancellationToken cancellationToken) { return((await _sqlServerProvider.Query <CartIdParams, CartPersistenceModel>("GetCartById", new CartIdParams() { Id = Guid.Parse(cartId) }, cancellationToken)).FirstOrDefault()); }