Step by step: .NET Core and Azure Cosmos DB

Step by step: .NET Core and Azure Cosmos DB is a short post on how to connect to Cosmos DB, save a document and then query to find it.

Let’s start:

1. Create a Cosmos DB account
2. Create a folder for your new project
3. Create the project
4. Add a reference to the Microsoft.Azure.DocumentDB.Core library
5. Restore packages
6. Modify Program.cs
7. Build
8. Run

You can get the code here: https://github.com/cmendible/dotnetcore.samples/tree/master/cosmosdb

Hope it helps!

2 thoughts on “Step by step: .NET Core and Azure Cosmos DB

Leave a Reply

Your email address will not be published. Required fields are marked *