Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.

dddddd-examplecqrscqrs-simplerest-apidotnetdotnercoreclean-architectureclean-codedappermediatrdomain-driven-design
Crecimiento de estrellas
Estrellas
3.1k
Forks
678
Crecimiento semanal
+1
Issues
7
1k2k3k
feb 2019ago 2021feb 2024sept 2026
README

Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.

CI

Give a Star! :star:

If you like this project, learn something or you are using it in your applications, please give it a star. Thanks!

Description

Sample .NET Core REST API application implemented with basic CQRS approach and Domain Driven Design.

Architecture Clean Architecture

projects_dependencies

CQRS

Read Model - executing raw SQL scripts on database views objects (using Dapper).

Write Model - Domain Driven Design approach (using Entity Framework Core).

Commands/Queries/Domain Events handling using MediatR library.

Domain

projects_dependencies

Validation

Data validation using FluentValidation

Problem Details for HTTP APIs standard implementation using ProblemDetails

Caching

Using Cache-Aside pattern and in-memory cache.

Integration

Outbox Pattern implementation using Quartz.NET

Simple CQRS implementation with raw SQL and DDD

Domain Model Encapsulation and PI with Entity Framework 2.2

REST API Data Validation

Domain Model Validation

How to publish and handle Domain Events

Handling Domain Events: Missing Part

Cache-Aside Pattern in .NET Core

The Outbox Pattern

How to run application

  1. Create empty database.
  2. Execute InitializeDatabase.sql script.
  3. Set connection string (in appsettings.json or by user secrets mechanism).
  4. Run!

How to run Integration Tests

  1. Create empty database.
  2. Execute InitializeDatabase.sql script.
  3. Set connection string using environment variable named ASPNETCORE_SampleProject_IntegrationTests_ConnectionString
Repositorios relacionados
dotnet-architecture/eShopOnContainers

Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.

C#tutorialdockernetcore
dot.net/architecture
24.3k10.1k
ardalis/CleanArchitecture

Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10

C#MIT Licenseclean-architecturearchitecture
18.5k3.1k
Sairyss/domain-driven-hexagon

Learn Domain-Driven Design, software architecture, design patterns, best practices. Code examples included

TypeScriptnpmtutorialMIT Licensedomain-driven-designhexagonal-architecture
14.9k1.6k
kgrzybek/modular-monolith-with-ddd

Full Modular Monolith application with Domain-Driven Design approach.

C#MIT Licensedddddd-architecture
14k2.2k
fuzhengwei/CodeGuide

:books: 本代码库是作者小傅哥多年从事一线互联网 Java 开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。如果本仓库能为您提供帮助,请给予支持(关注、点赞、分享)!

ShelltutorialApache License 2.0javajavafx
bugstack.cn
11.9k4.2k
mehdihadeli/awesome-software-architecture

📚 A curated list of awesome articles, videos, and other resources to learn and practice software architecture, patterns, and principles.

TypeScriptnpmawesomeCreative Commons Zero v1.0 Universalarchitectureddd
awesome-architecture.com
11.6k1k
dotnet-architecture/eShopOnWeb

Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb

C#MIT Licenseasp-net-coreasp-net-core-mvc
10.7k6k
EduardoPires/EquinoxProject

Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices

C#MIT Licenseequinoxcqrs
equinoxproject.azurewebsites.net
6.8k1.6k
gotson/komga

Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS, Kobo Sync and KOReader Sync support

KotlinlibraryMIT Licensekotlinspring-boot
komga.org
6.6k404
ThreeDotsLabs/wild-workouts-go-ddd-example

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.

GoGo ModulesMIT Licensegogolang
threedots.tech
6.4k585
ddd-by-examples/library

A comprehensive Domain-Driven Design example with problem space strategic analysis and various tactical patterns.

JavaMaventutorialMIT Licensedomain-driven-designddd
5.9k832
thangchung/go-coffeeshop

☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment

GoGo ModulesMIT Licenseclean-architectureecho-framework
4.4k453