Batteries-included .NET project template which serves as a good starting point to scale to more complex projects.
This template includes some opinionated defaults based on personal preference.
It has the following features & pre-configured defaults:
- ASP.NET Core Minimal API project
- ASP.NET Core Worker project - for background/long-running tasks
- Minimal CQRS implementation for handling commands & queries
- Docker support using
Dockerfile
- .NET Aspire Support
- .NET Aspire Test Project for E2E tests using TUnit
- Entity Framework Core with SQL Server for persistence
- Pretty OpenAPI docs using Scalar
- GitHub Actions Workflow for building & testing solution
- Dependabot configuration for automatic dependency updates
- NuGet Package Auditing
- NuGet Central Package Management
- NuGet Lock Files Enabled
- .NET Chiseled Containers
- .NET Rootless Linux Containers
- Centralised project configuration using
Directory.Build.Props
- to consolidate duplicated project properties across projects - Basic
index.html
landing page for the API project - to avoid a 404 when navigating to the root URL - Default
global.json
file with roll-forward policy set tolatestFeature
to always use the latest installed feature band
Install the .NET template:
dotnet new install MarcelMichau.Templates.DotNetStarterProject::1.4.5
After installation, create a new project using the template:
dotnet new mm-dotnet-starter -o MyAwesomeApp
Change into the Aspire AppHost project
cd MyAwesomeApp\src\MyAwesomeApp.AppHost
Run the project
dotnet run
From the project root, run the following:
dotnet ef migrations add <migration-name> -p .\src\MyAwesomeApp.Application\ -s .\src\MyAwesomeApp.Api\ -o Infrastructure\Persistence\Migrations