Skip to content

Commit 22a3c85

Browse files
authored
Merge pull request #105366 from markjbrown/master
update stored proc net v3
2 parents 276d14a + 02dc587 commit 22a3c85

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

articles/cosmos-db/how-to-use-stored-procedures-triggers-udfs.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to register and call stored procedures, triggers, and use
44
author: markjbrown
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 09/17/2019
7+
ms.date: 02/24/2020
88
ms.author: mjbrown
99
---
1010

@@ -68,15 +68,17 @@ StoredProcedureResponse storedProcedureResponse = await client.GetContainer("dat
6868
The following code shows how to call a stored procedure by using the .NET SDK V3:
6969

7070
```csharp
71-
dynamic newItem = new
71+
dynamic[] newItems = new dynamic[]
7272
{
73-
category = "Personal",
74-
name = "Groceries",
75-
description = "Pick up strawberries",
76-
isComplete = false
73+
new {
74+
category = "Personal",
75+
name = "Groceries",
76+
description = "Pick up strawberries",
77+
isComplete = false
78+
}
7779
};
7880

79-
var result = await client.GetContainer("database", "container").Scripts.ExecuteStoredProcedureAsync<string>("spCreateToDoItem", new PartitionKey("Personal"), newItem);
81+
var result = await client.GetContainer("database", "container").Scripts.ExecuteStoredProcedureAsync<string>("spCreateToDoItem", new PartitionKey("Personal"), newItems);
8082
```
8183

8284
### Stored procedures - Java SDK

0 commit comments

Comments
 (0)