From 67da0bfb31846a6afcb015e8af8159e94fc2d819 Mon Sep 17 00:00:00 2001 From: j82w Date: Fri, 3 Jun 2022 10:09:13 -0700 Subject: [PATCH] Samples: Adds warning about System.Text.Json and LINQ (#3251) --- Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs index 739595d262..ac990a4e28 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/Program.cs @@ -115,6 +115,8 @@ private static async Task RunDemo() Console.WriteLine($"Created Completed activity with id {createCompletedActivity.Resource.Id} that cost {createCompletedActivity.RequestCharge}"); // Execute queries materializing responses using System.Text.Json + // NOTE: GetItemLinqQueryable does not support System.Text.Json attributes. LINQ will not translate the name based on the attributes + // which can result in no or invalid results coming back. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3250 using FeedIterator iterator = container.GetItemQueryIterator("select * from c where c.status = 'Completed'"); while (iterator.HasMoreResults) {