Clean Architecture — Azure Functions Using Partitioned Repository Pattern with Cosmos DB

Discussing an All-in-One starter project for Azure Functions to work with Cosmos DB using Partitioned Repository Pattern, with features like Dependency Injection, structured logging, strongly-typed configuration, email service, etc..

Shawn Shi
The Startup

--

Screenshot by Author

Goal Overview

The goal of this article is to discuss a starter project that can be used to work with Azure Functions and Cosmos DB and be (almost) production ready without having to worry about solution design. This project is designed in Clean Architecture, and includes many of the common features that you would expect on a production environment, such as structured logging using Serilog, strongly-typed configuration, Dependency Injection for Inversion of Control, email service, etc..

Before we dive into the actual project, let’s do a quick overview.

Azure Cosmos DB — 10,000-Foot Overview

Azure Cosmos DB is the managed NoSQL database service provided by Microsoft. It supports APIs like SQL, Cassandra, and MongoDB etc., which allows the developers to use query language of their…

--

--

Shawn Shi
The Startup

Senior Software Engineer at Microsoft. Ex-Machine Learning Engineer. When I am not building applications, I am playing with my kids or outside rock climbing!