Beispiel #1
0
        private static async Task QueryData(FlightsContext flightsContext)
        {
            var query   = "SELECT * FROM flights WHERE flights.Origin = 'SFO'";
            var flights = await flightsContext.QueryDocumentAsync <Flight>(
                query,
                flightsContext.FlightsDocumentCollectionSelfLink);

            foreach (var flight in flights)
            {
                await Console.Out.WriteLineAsync(
                    $"[{flight.Number}]\t{flight.Origin} -> {flight.Destination}");
            }
        }