-
Notifications
You must be signed in to change notification settings - Fork 491
Draft: Migration from v2 to v3 SDK
j82w edited this page Sep 19, 2019
·
6 revisions
- Collection -> Container
- Documents -> Items
- DocumentClient -> CosmosClient
- ConnectionPolicy -> CosmosClientOptions
- Database -> DatabaseProperties
- DocumentCollection -> ContainerProperties
- Document -> Not available
- StoredProcedure -> StoredProcedureProperties
- Trigger -> TriggerProperties
- v3 defaults to Direct + TCP because it gives better performance and scalability over Gateway + HTTPS.
-
UriFactory
is replaced by the Fluent design. The fluent design builds the URLs internally which allows a single Container object to be passed around instead of a DocumentClient, DatabaseName, and collection name. -
Document
andResource
class do not exist in v3. A lot of issues were caused by these classes. For example theDocument
class would sometimes not serialize properties if they were not properly set. - Document id is not auto populated in v3. To auto populate the id it requires the document to be parsed and checked if the id exists which causes an unnecessary performance hit for most users. An Extension Method can be implemented to add the same functionality.