Configuring a Cosmos DB client

Now we will write the code for the main method of our console application that will retrieve the necessary values from the previously coded JSON configuration file to configure an instance of the Microsoft.Azure.Documents.Client.DocumentClient class, which will allow us to write additional code that will perform requests to the Azure Cosmos DB service. We will be writing methods that perform additional tasks later, and we will use many code snippets to understand each task. We will analyze many of the possible ways of performing tasks with the Cosmos DB SDK.

Replace the code of the Program.cs file with the following contents, which declare the necessary using statements, the first lines of the new Program class, ...

Get Guide to NoSQL with Azure Cosmos DB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.