Getting ready

Perform the following prerequisites:

  1. Create a Cosmos DB account by following the instructions mentioned in the article at https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-dotnet.
  2. Create a Cosmos database and a collection with fixed storage and set the request units to 400 per second, as shown in the following screenshot:

For the sake of simplicity, I have taken Fixed (10 GB) as the Storage capacity. However, in production loads, depending on your data models, you might have to go with Unlimited storage capacity. 

  1. Run the following command in the NuGet package manager to install the dependencies of Cosmos DB:
Install-Package Microsoft.Azure.WebJobs.Extensions.CosmosDB