Created
April 16, 2021 17:56
-
-
Save ealsur/01b99715c98e11a6bd0ce7c4ea5e80dd to your computer and use it in GitHub Desktop.
Create and initialize CosmosClient
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
List<(string, string)> containers = new List<(string, string)> | |
{ | |
("DatabaseNameForContainer1", "ContainerName1"), | |
("DatabaseNameForContainer2", "ContainerName2") | |
}; | |
CosmosClientOptions cosmosClientOptions = new CosmosClientOptions | |
{ | |
ApplicationName = "MyApplicationName", | |
// any other setting I want to customize | |
}; | |
CosmosClient cosmosClient = await CosmosClient.CreateAndInitializeAsync(connectionString, containers, cosmosClientOptions); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I went with that option instead. That works too :)
Thanks!