Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sample-dotnet-core-cqrs-api

> 设计协作
Open source

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

3.1K stars0 likes3 views
WebsiteGitHub

About

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

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

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

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

Related blog articles

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
  • Run tests from project src/Tests/SampleProject.IntegrationTests

Issues· 13 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#clean-architectureclean-codecqrscqrs-simple

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category设计协作
PricingOpen source

> Related tools

F
Figma
协作式界面设计工具
S
sketch-wakatime
Sketch plugin for automatic time tracking and metrics generated from your Sketch usage.
Q
QuickColor
Quickly apply fills from the global or document color palettes to selected elements - 🎨