Exercise 2 – creating an Azure Cosmos DB SQL API account
We will create an Azure Cosmos DB account by following the same steps in the first exercise, but we will select the Core (SQL) API option.
We will start by adding a new database and a container. After, we will add data to the created database. We will query the data and, in the end, use the SDK of Cosmos DB to connect to the Azure Cosmos DB SQL API while using C# as the programming language.
Adding a new database and a new container
Let’s look at the steps:
- Select Data Explorer to create a new container, then select New container:
Figure 9.8 – Data Explorer option in the Azure Cosmos DB account
We need to fill in all the information needed:
- Database id is the name of the database; we can add any unique name or we can use an existing one.
- Check Share throughput across containers. This allows you to distribute your database’s provisioned...