liwoo / clean-dapper-template

A template for the Clean Architecture that uses Dapper (SimpleCRUD) and Simple Migrations instead of EF Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean Architecture with Dapper

I absolutely love the Clean Architecture in .NET. However, it seems like most of the templates available are tied to Entity Framework. Personally for most use cases, I prefer using Dapper. This is therefore a Clean Architecture templae that uses Dapper as the Databse Layer, and a few other opinions.

Features

Health Checks

This template is built for a Cloud Native experience. And in the cloud, having the ability to determine the health of your application is key. The template gives you the health of your main application and database to start with, with a blueprint of how to extend this to other infrastructure you will be integrating with.

Integration Tests

I wanted to make it dead easy to write and run integration tests

Fluent Validation

API Exception Filters

Dapper ORM

Fluent Migrations

Installation

The solution depends on DotNet 5 so make sure you have it installd before running the following conversation:

  dotnet restore
  dotnet build
  cd src/api
  dotnet run

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

API_KEY

ANOTHER_API_KEY

About

A template for the Clean Architecture that uses Dapper (SimpleCRUD) and Simple Migrations instead of EF Core


Languages

Language:C# 100.0%