In this demo you will connect to provisioned Cosmos DB. You will create a new SP from the portal and test it from the portal. You will create a new Trigger and run the code to test the trigger.
- Visual Studio Code
- net 5.0
-
From the previously created Cosmos DB pull the key and endpoint from the Azure Portal.
-
In the same Cosmos DB find container with name TheDemo
-
Create new Stored Procedure from file: sp
-
From the portal execute SP and received the output: "Hello World"
-
Create new PRE INSERT trigger from file: trigger
-
Open folder from Visual Studio Code and updated
Program.cs
-
From the console run commands
dotnet build
anddotnet run
-
Monitor console for the code output. The first insert should be accepted an the second insert should be rejected.