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 async Task ListFinishedCompetitionsFirstWinner(GamingPlatform gamingPlatform, string zipCode) { // Retrieve the winner with the first position for all the finished competitions // that allowed the platform received as an argument // and...