Abdelmajid BACO

Jul 7, 2020

4 min read

CQRS Pattern With C# (Part 1)

Understand CQRS pattern in a real world application

CQRS Pattern with C#
Image from Pexels

Traditional Architecture

Command and Query with traditional architecture (From Microsoft Docs)
Command and Query with traditional architecture (From Microsoft Docs)

New Architecture With CQRS

Command Query Responsibility Segregation architecture (From Microsoft Docs)
Command Query Responsibility Segregation architecture (From Microsoft Docs)

Real World Application

CQRS Architecture in Domain-Driven Design (DDD)
Lite CQRS Architecture
Domain-Driven Design (DDD) solution with CQRS pattern
Solution structure
Interfaces to manage queries
Interfaces to manage commands
Command object
Command object handler
Command dispatcher
Call dispatcher to perform commands

Conclusion

Learn More / Resources