Skip to content

Commit ad0904d

Browse files
authored
Merge pull request #189523 from j82w/users/jawilley/queryspec
Add SqlQuerySpec to Cosmos .NET SDk V3 migration guide.
2 parents 6b140c4 + c2aed4a commit ad0904d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 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: 02/18/2022
9+
ms.date: 02/23/2022
1010
ms.devlang: csharp
1111
---
1212

@@ -76,6 +76,7 @@ The following are some of the main class name changes:
7676
|`Microsoft.Azure.Documents.Client.FeedOptions`|`Microsoft.Azure.Cosmos.QueryRequestOptions`|
7777
|`Microsoft.Azure.Documents.Client.StoredProcedure`|`Microsoft.Azure.Cosmos.StoredProcedureProperties`|
7878
|`Microsoft.Azure.Documents.Client.Trigger`|`Microsoft.Azure.Cosmos.TriggerProperties`|
79+
|`Microsoft.Azure.Documents.SqlQuerySpec`|`Microsoft.Azure.Cosmos.QueryDefinition`|
7980

8081
### Classes replaced on .NET v3 SDK
8182

@@ -634,6 +635,11 @@ private static async Task ReadAllItems(DocumentClient client)
634635
---
635636

636637
### Query items
638+
#### Changes to SqlQuerySpec (QueryDefinition in v3.0 SDK)
639+
640+
The `SqlQuerySpec` class in SDK v2 has now been renamed to `QueryDefinition` in the SDK v3.
641+
642+
`SqlParameterCollection` and `SqlParameter` has been removed. Parameters are now added to the `QueryDefinition` with a builder model using `QueryDefinition.WithParameter`. Users can access the parameters with `QueryDefinition.GetQueryParameters`
637643

638644
# [.NET SDK v3](#tab/dotnet-v3)
639645

0 commit comments

Comments
 (0)