Writing LINQ queries that perform operations on arrays

The following lines declare the code for the ListFinishedCompetitionsFirstWinner asynchronous static method. This method builds a LINQ query to retrieve the winner with the first position for all the finished competitions. The competitions are filtered to include only those that allowed the platform received as an argument and that are located in the zip code received as a parameter. The query restricts the location's zip code value, and therefore, it is a single-partition query.

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 ...

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.