CQRS

CQRS has a reputation for being complicated: separate databases, Event Sourcing, message buses. None of that is required. At its core, it means handling changes and queries as separate operations, each shaped for its own job.

The first article separates facts from myths. The next three show how CQRS leads to vertical slices, which means organising code by business feature instead of by technical layer, and what that changes in ownership and dependencies. Then come practical questions, like whether a command can return a value and why generic code isn’t automatically simple. Two articles show how to lay out a codebase by feature, the second on a hotel reservation example. The last one shows it all in .NET code.

If you’re new to CQRS, start with the first article. If you already use it, the articles on vertical slices are the most likely to change how you structure code.

  1. CQRS facts and myths explained

    2021-03-03I’m sure that you know a lot of Urban Legends. They usually start with “hey, my friend’s cousin saw that…” or “you know, I’ve read such stuff on the Internet…”. Everyone…
  2. My thoughts on Vertical Slices, CQRS, Semantic Diffusion and other fancy words

    2025-08-25Welcome to the new week! Vertical Slices in software architecture are pictured right now as the best thing since sliced bread. I won’t try to hide that, like it. I’ve…
  3. Vertical slices, their ownership and external dependencies

    2026-08-10A few questions about Vertical Slices come up again and again, and they’re good ones. If a slice cuts through all the layers, do we get a table per slice? If I’ve split…
  4. Fractal Architecture, Cognitive Load, Vertical Slices and other terms that do(n't) fit your head

    2026-08-17I wrote on LinkedIn that it seems that there are never enough articles on Vertical Slices. Each time I write a follow-up, there’s another follow-up needed. And guess what…
  5. Can command return a value?

    2021-03-10Last week I busted common myths and explained facts about CQRS. Today I’ll continue my effort. I tackle one of the most common questions about CQRS: “Can command return…
  6. Generic does not mean Simple

    2021-06-16As you know, I am a fan and practitioner of CQRS.. I believe that it is falsely considered as complicated. In my opinion, it can help even with the classic CRUD approach…
  7. How to slice the codebase effectively?

    2021-09-08The structure of projects is as sensitive as the discussions of spaces versus tabs or indentation size. When we enter someone’s apartment, even when it is decorated based…
  8. Vertical Slices in practice

    2023-07-09I’m a preacher for the CQRS, Vertical Slices, and Feature Folders. I won’t hide that, and I won’t even try. I believe that structuring code based on the business feature…
  9. CQRS is simpler than you think with .NET 6 and C# 10

    2021-12-15.NET and CQRS are well known for the high ceremony and enterprise feeling. You should treat that as superstition. Let me tell you why. CQRS is a pattern where we’re…