From 9798f0cc8216ff7ef84297b15e7d3ae89a729f7f Mon Sep 17 00:00:00 2001 From: tylerthome Date: Thu, 12 Jan 2023 17:06:49 -0800 Subject: [PATCH] Adjust env var name to match tutorial The associated markdown file specifies a different environment variable name (`COSMOS_CONNECTION_STRING`) than this example program (currently `MONGO_CONNECTION`): https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/cosmos-db/mongodb/includes/environment-variables-connection-string.md referenced from: https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/cosmos-db/mongodb/quickstart-dotnet.md#configure-environment-variables --- 001-quickstart/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/001-quickstart/Program.cs b/001-quickstart/Program.cs index 37eaedb..f5d3145 100644 --- a/001-quickstart/Program.cs +++ b/001-quickstart/Program.cs @@ -8,7 +8,7 @@ // // New instance of CosmosClient class -var client = new MongoClient(Environment.GetEnvironmentVariable("MONGO_CONNECTION")); +var client = new MongoClient(Environment.GetEnvironmentVariable("COSMOS_CONNECTION_STRING")); // // @@ -57,4 +57,4 @@ { Console.WriteLine(prod.Name); } -// \ No newline at end of file +//