Querying documents in multiple partitions

The following lines declare the code for the ListScheduledCompetitions asynchronous static method, which builds a query to retrieve the titles for all the scheduled competitions that have more than 200 registered competitors and shows them in the console output. In order to retrieve these titles, we must run a cross-partition query because the competitions with more than 200 registered competitors can be at any location; that is, at any ZIP code.

As happened in other samples, there are other ways of achieving the same results. In this case, we use a similar pattern to the one we introduced in the GetCompetitionByTitle asynchronous static method. Add the following lines to the existing code ...

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.