You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure Cosmos DB query provider performs a best effort mapping from a LINQ query into an Azure Cosmos DB SQL query. If you want to get the SQL query that is translated from LINQ, use the `ToString()` method on the generated `IQueryable`object. The following description assumes a basic familiarity with [LINQ](/dotnet/csharp/programming-guide/concepts/linq/introduction-to-linq-queries). In addition to LINQ, Azure Cosmos DB also supports [Entity Framework Core](/ef/core/providers/cosmos/?tabs=dotnet-core-cli) which works with API for NoSQL.
@@ -26,7 +29,7 @@ The query provider supports the following scalar expressions:
26
29
27
30
- Property/array index expressions that refer to the property of an object or an array element. For example:
28
31
29
-
```
32
+
```csharp
30
33
family.Id;
31
34
family.children[0].familyName;
32
35
family.children[0].grade;
@@ -35,21 +38,21 @@ The query provider supports the following scalar expressions:
35
38
36
39
- Arithmetic expressions, including common arithmetic expressions on numerical and Boolean values. For the complete list, see the [Azure Cosmos DB SQL specification](aggregate-functions.md).
37
40
38
-
```
41
+
```csharp
39
42
2*family.children[0].grade;
40
43
x+y;
41
44
```
42
45
43
46
- String comparison expressions, which include comparing a string value to some constant string value.
44
47
45
-
```
48
+
```csharp
46
49
mother.familyName=="Wakefield";
47
50
child.givenName==s; //s is a string variable
48
51
```
49
52
50
53
- Object/array creation expressions, which return an object of compound value type or anonymous type, or an array of such objects. You can nest these values.
0 commit comments