Querying documents in multiple partitions with LINQ

The following lines declare the code for the ListScheduledCompetitionsWithLinq asynchronous static method, which builds a LINQ query to retrieve the titles for all the scheduled competitions that have more than five registered competitors and show them in the console output.

Add the following lines to the existing code of the Program.cs file. The code file for the sample is included in the learning_cosmos_db_05_01 folder in the SampleApp2/SampleApp1/Program.cs file:

private static async Task ListScheduledCompetitionsWithLinq() { // Retrieve the titles for all the scheduled competitions that have more than 5 registered competitors var selectTitleQuery = client.CreateDocumentQuery<Competition>(collectionUri, ...

Get Guide to NoSQL with Azure Cosmos DB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.