A starting point to build a multi-tenant web API to work with Azure Cosmos DB, based on Clean Architecture and repository design pattern. Partition key is also implemented through the repository pattern. Azure Cosmos DB .NET SDK V3 and .NET 6 are used.
- Download the Azure CosmosDB emulator
- Start the emulator locally
- Set the API project as your Startup project in Visual Studio and run the web API
- The swagger UI page should be loaded at: https://localhost:5001/swagger/index.html
- Running the API project will automatically ensure Cosmos DB database and containers are created and also seed application data. See Program.cs
⭐ If you enjoy this project, or are using this project to start your exciting new project, or are just forking it to play, please give it a star. Much appreciated! ⭐
- .NET 6
- Azure Cosmos DB .NET SDK V3
- Partition key per tenant implementation
- Partitioned repository pattern
- Clean Architecture
- REST API
I have published some short articles to cover different aspects of this project. Please feel free to give them a read.