Last active
June 18, 2019 07:21
-
-
Save sajeetharan/788a6acf99416dde8e6ebd652c2b3ed2 to your computer and use it in GitHub Desktop.
Creating cosmosdb client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = new ConfigurationBuilder().SetBasePath(context.FunctionAppDirectory) | |
.AddJsonFile("local.settings.json", optional: true, reloadOnChange: true) | |
.AddEnvironmentVariables() | |
.Build(); | |
//1) initialize the cosmosdb client | |
using (DocumentClient client = new DocumentClient(new Uri(config["CosmosDB_Uri"]), config["CosmosDB_appKey"])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment