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
Because the .NET v3 SDK allows users to configure a custom serialization engine, there's no direct replacement for the `Document` type. When using Newtonsoft.Json (default serialization engine), `JObject` can be used to achieve the same functionality. When using a different serialization engine, you can use its base json document type (for example, `JsonDocument` for System.Text.Json). The recommendation is to use a C# type that reflects the schema of your items instead of relying on generic types.
116
114
115
+
*`Microsoft.Azure.Documents.Resource`
116
+
117
+
There is no direct replacement for `Resource`, in cases where it was used for documents, follow the guidance for `Document`.
118
+
119
+
*`Microsoft.Azure.Documents.AccessCondition`
120
+
121
+
`IfNoneMatch` or `IfMatch` are now available on the `Microsoft.Azure.Cosmos.ItemRequestOptions` directly.
122
+
117
123
### Changes to item ID generation
118
124
119
125
Item ID is no longer auto populated in the .NET v3 SDK. Therefore, the Item ID must specifically include a generated ID. View the following example:
@@ -125,31 +131,22 @@ public Guid Id { get; set; }
125
131
126
132
### Changed default behavior for connection mode
127
133
128
-
The SDK v3 now defaults to Direct + TCP connection modes compared to the previous v2 SDK, which defaulted to Gateway + HTTPS connections modes. This change provides enhanced performance and scalability.
134
+
The SDK v3 now defaults to [Direct + TCP connection modes](sdk-connection-modes.md) compared to the previous v2 SDK, which defaulted to Gateway + HTTPS connections modes. This change provides enhanced performance and scalability.
129
135
130
136
### Changes to FeedOptions (QueryRequestOptions in v3.0 SDK)
131
137
132
138
The `FeedOptions` class in SDK v2 has now been renamed to `QueryRequestOptions` in the SDK v3 and within the class, several properties have had changes in name and/or default value or been removed completely.
133
139
134
-
`FeedOptions.MaxDegreeOfParallelism` has been renamed to `QueryRequestOptions.MaxConcurrency` and default value and associated behavior remains the same, operations run client side during parallel query execution will be executed serially with no-parallelism.
135
-
136
-
`FeedOptions.EnableCrossPartitionQuery` has been removed and the default behavior in SDK 3.0 is that cross-partition queries will be executed without the need to enable the property specifically.
137
-
138
-
`FeedOptions.PopulateQueryMetrics` is enabled by default with the results being present in the `FeedResponse.Diagnostics` property of the response.
139
-
140
-
`FeedOptions.RequestContinuation` has now been promoted to the query methods themselves.
141
-
142
-
The following properties have been removed:
143
-
144
-
*`FeedOptions.DisableRUPerMinuteUsage`
145
-
146
-
*`FeedOptions.EnableCrossPartitionQuery`
147
-
148
-
*`FeedOptions.JsonSerializerSettings`
149
-
150
-
*`FeedOptions.PartitionKeyRangeId`
151
-
152
-
*`FeedOptions.PopulateQueryMetrics`
140
+
| .NET v2 SDK | .NET v3 SDK |
141
+
|-------------|-------------|
142
+
|`FeedOptions.MaxDegreeOfParallelism`|`QueryRequestOptions.MaxConcurrency` - Default value and associated behavior remains the same, operations run client side during parallel query execution will be executed serially with no-parallelism.|
|`FeedOptions.EnableCrossPartitionQuery`|Removed. Default behavior in SDK 3.0 is that cross-partition queries will be executed without the need to enable the property specifically. |
145
+
|`FeedOptions.PopulateQueryMetrics`|Removed. It is now enabled by default and part of the [diagnostics](troubleshoot-dotnet-sdk.md#capture-diagnostics).|
146
+
|`FeedOptions.RequestContinuation`|Removed. It is now promoted to the query methods themselves. |
147
+
|`FeedOptions.JsonSerializerSettings`|Removed. Serialization can be customized through a [custom serializer](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.serializer) or [serializer options](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions.serializeroptions).|
148
+
|`FeedOptions.PartitionKeyRangeId`|Removed. Same outcome can be obtained from using [FeedRange](change-feed-pull-model.md#using-feedrange-for-parallelization) as input to the query method.|
0 commit comments