Implementing the CQRS pattern

CQRS simply works on the separation between queries (to read) and commands (to modify). Command-Query Separation (CQS) is an approach to Object-oriented Design (OOD).

CQRS was introduced for the first time by Bertrand Meyer (https://en.wikipedia.org/wiki/Bertrand_Meyer). He mentioned this term in his book, Object-Oriented Software Construction, during the late 1980s: https://www.amazon.in/Object-Oriented-Software-Construction-Prentice-hall-International/dp/0136291554.

CQRS does fit well with some scenarios and has some useful factors to it:

  • Model separation: In modeling terms, we are able to have multiple representations for our data model. The clear separation allows for choosing different frameworks or techniques ...

Get Hands-On Design Patterns with C# and .NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.