O'Reilly logo

Guide to NoSQL with Azure Cosmos DB by Daron Yondem, Gaston C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required