Skip to content

Commit e1cd56c

Browse files
authored
Merge pull request #188593 from Venkat1340/Users/Venkat1340/Migrationofdocument
MsDocs: Migration of Document
2 parents 00f2362 + cfedebf commit e1cd56c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

articles/cosmos-db/sql/migrate-dotnet-v3.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: esarroyo
66
ms.service: cosmos-db
77
ms.subservice: cosmosdb-sql
88
ms.topic: how-to
9-
ms.date: 01/13/2022
9+
ms.date: 02/15/2022
1010
ms.devlang: csharp
1111
---
1212

@@ -89,6 +89,8 @@ The following classes have been replaced on the 3.0 SDK:
8989

9090
The Microsoft.Azure.Documents.UriFactory class has been replaced by the fluent design. The fluent design builds URLs internally and allows a single `Container` object to be passed around instead of a `DocumentClient`, `DatabaseName`, and `DocumentCollection`.
9191

92+
Because the .NET v3 SDK allows users to configure a custom serialization engine, there is 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.
93+
9294
### Changes to item ID generation
9395

9496
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:

0 commit comments

Comments
 (0)