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
List<SfCase>cases=awaitclient.Query<SfCase>("SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case");
27
+
```
28
+
29
+
### Nested Query Results
30
+
31
+
When you include related objects in a SOQL query:
32
+
```
33
+
SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case
34
+
```
35
+
36
+
And get the results via the client, you can then access the related objects and fields included in the query in a fluent manner.
37
+
```csharp
38
+
List<SfCase>cases=awaitclient.Query<SfCase>("SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case");
39
+
SfCasefirstCase=cases[0];
40
+
stringcaseNumber=firstCase.CaseNumber;
41
+
stringcaseAccountName=firstCase.Account.Name;
42
+
stringcaseContactName=firstCase.Contact.Name;
43
+
```
44
+
45
+
Nested queries are not fully supported - the subquery results will not be complete if they exceed the batch size as the NextRecordsUrl in the subquery results is not being acted upon. Instead use the relationship syntax in the example above.
46
+
```
47
+
// *NOT* fully supported
48
+
"SELECT Id,CaseNumber, (Select Contact.Name from Account) FROM Case"
49
+
```
50
+
51
+
### Asynchronous Batch Processing
52
+
53
+
Query<T> method will retrieve the full result set before returning. By default, results are returned in batches of 2000.
54
+
In cases where you are working with large result sets, you may want to use QueryAsync<T> to retrieve the batches asynchronously for better performance.
55
+
56
+
```csharp
57
+
// First create the async enumerable. At this point, no query has been executed.
58
+
// batchSize can be omitted to use the default (usually 2000), or given a custom value between 200 and 2000.
59
+
IAsyncEnumerable<SfContact>contactsEnumerable=client.QueryAsync<SfContact>("SELECT Id, Name FROM Contact ", batchSize: 200);
60
+
61
+
// Get the enumerator, in a using block for proper disposal
List<SfCase>cases=awaitclient.Query<SfCase>("SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case");
92
-
```
93
-
94
-
### Nested Query Results
95
-
96
-
When you include related objects in a SOQL query:
97
-
```
98
-
SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case
99
-
```
100
-
101
-
And get the results via the client, you can then access the related objects and fields included in the query in a fluent manner.
102
-
```csharp
103
-
List<SfCase>cases=awaitclient.Query<SfCase>("SELECT Id,CaseNumber,Account.Name,Contact.Name FROM Case");
104
-
SfCasefirstCase=cases[0];
105
-
stringcaseNumber=firstCase.CaseNumber;
106
-
stringcaseAccountName=firstCase.Account.Name;
107
-
stringcaseContactName=firstCase.Contact.Name;
108
-
```
109
-
110
-
Nested queries are not fully supported - the subquery results will not be complete if they exceed the batch size as the NextRecordsUrl in the subquery results is not being acted upon. Instead use the relationship syntax in the example above.
111
-
```
112
-
// *NOT* fully supported
113
-
"SELECT Id,CaseNumber, (Select Contact.Name from Account) FROM Case"
114
-
```
115
-
116
-
### Asynchronous Batch Processing
117
-
118
-
Query<T> method will retrieve the full result set before returning. By default, results are returned in batches of 2000.
119
-
In cases where you are working with large result sets, you may want to use QueryAsync<T> to retrieve the batches asynchronously for better performance.
120
-
121
-
```csharp
122
-
// First create the async enumerable. At this point, no query has been executed.
123
-
// batchSize can be omitted to use the default (usually 2000), or given a custom value between 200 and 2000.
124
-
IAsyncEnumerable<SfContact>contactsEnumerable=client.QueryAsync<SfContact>("SELECT Id, Name FROM Contact ", batchSize: 200);
125
-
126
-
// Get the enumerator, in a using block for proper disposal
0 commit comments