Creating Cosmos DB resources
To see Azure Cosmos DB in action, first, we must create Cosmos DB resources. We can manually create them in the cloud using the Azure portal or programmatically create them using the Azure Cosmos DB .NET SDK. Azure Cosmos DB resources created in the cloud have a cost unless you use a trial or free account.
You can also create Azure Cosmos DB resources locally using an emulator, which will cost you nothing. At the time of writing, the Azure Cosmos DB Emulator only supports Windows. If you want to use Linux or macOS, then you can try to use the Linux Emulator, which is currently in preview, or you could host the emulator in a Windows virtual machine.
Using an emulator on Windows to create Azure Cosmos DB resources
If you do not have a Windows computer, then just read through this section without completing the steps yourself, and then in the next section, you will use the Azure portal to create Azure Cosmos DB resources.
Let’s use...