Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › .NET

Trying Out Sekiban DCB in Native C#: An Introduction to Event Sourcing and CQRS

By Freedom251 Team · · 5 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A short tutorial published on Zenn in September 2026 walks through Sekiban DCB, an event sourcing and CQRS framework for .NET, using a student and class sample in Native C#. Its real value for a newcomer is the sequence it makes visible: a command is requested, an immutable event is recorded against a tag, and state is rebuilt from that tagged history when someone asks for it. This guide follows the same path, explains which parts of the setup are time-sensitive, and marks where the tutorial’s claims stop.

What Sekiban DCB is, as the tutorial describes it

The introduction quotes the Sekiban site’s own description of the framework: “It is an open source Event Sourcing / CQRS framework for .NET. It stores not only the current state but all changes as immutable events.” The point of that sentence is that the history is the record. Instead of overwriting a student’s row, the system keeps every change as a fact that happened at a particular time, and current state is a calculation over those facts.

As an Amazon Associate I earn from qualifying purchases.

The tutorial places Sekiban DCB within Dynamic Consistency Boundary (DCB) design. In this model, events are recorded in a single global stream, and consistency is checked against the events that a particular command depends on rather than against a fixed aggregate boundary. The DEV Community rendering of the same article also describes Sekiban as an open-source C#/.NET framework and lists Azure Cosmos DB, PostgreSQL, and AWS DynamoDB as storage options. Those storage claims come from the article and its rendering; they have not been independently confirmed for this guide, so check the current framework documentation before choosing a backend.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the underlying idea, a developer-authored explainer by Tomohisa Takaoka, published on Zenn on 2025-09-20, describes pure DCB in terms of append conditions and global sequence positions. It describes Sekiban’s distributed-oriented design as a tag-level sequence of reservation, write, and confirmation. Its comparison covers ordering, scalability, consistency, implementation complexity, and availability. That is the author’s architectural analysis, not measured performance data, and it is a useful companion when you want to understand why the framework is shaped the way it is.

Setting up the sample

The author develops on Windows 11 Pro and assumes an ASP.NET development environment is already available. The tutorial’s command sequence is:

dotnet new install Sekiban.Dcb.Templates
dotnet new sekiban-dcb-decider -n MyApp
dotnet run --project MyApp.AppHost

The first command installs the template package, the second generates a project from the decider template, and the third starts the project’s AppHost, which the tutorial describes as launching the Aspire dashboard. Treat these as the commands the article reported at the time of writing (the Zenn introduction is dated 2026-09-10, and the DEV rendering was posted 2026-09-16). Template names, the .NET SDK version, and prerequisites change, so confirm them against current Sekiban project documentation before you rely on them. If a command fails, the first thing to check is whether the template package resolves on your SDK version.

How the generated solution is organized

The template produces four projects, each with one job:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Project Responsibility in the tutorial
DCBNativeProject.AppHost Dependent services, connections, ports, and startup order
DCBNativeProject.ApiService API routes and authentication
DCBNativeProject.EventSource Commands, handlers, projectors, and query processing
DCBNativeProject.ImmutableModels Student and class events, tags, state, and deciders

Keep this map open while you trace a request. Most of the learning happens in the EventSource and ImmutableModels projects; the AppHost and ApiService are plumbing that wires the sample together.

Tracing the sample’s event flow

The tutorial walks through two flows. Reading them side by side is the fastest way to see how commands, events, and state relate.

Creating a student

  1. The API receives request JSON and converts it into a CreateStudent command.
  2. The command is executed with ExecuteAsync.
  3. The handler produces a StudentCreated event, and that event is associated with a StudentTag.
  4. The framework persists the event. In this flow the sample does not contain database persistence code.
  5. The result is returned to the caller.

Notice that nothing in this flow stores a “current student” record. What is saved is the fact that a student was created, and the tag is the handle that later lets the system find that fact again.

Retrieving a student

  1. The API receives the student ID.
  2. The system locates the student’s history through StudentTag.
  3. It selects StudentProjector, the component that turns events into state.
  4. It calls GetTagStateAsync, which restores state by replaying the tagged event history.
  5. The restored state is returned.

The author’s takeaway is that working through this sample lets you focus on event and state logic without writing database persistence code yourself. That observation applies to this sample. It does not mean that storage choice, consistency behavior, or operational concerns stop mattering in a production system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Four concepts to separate while reading

  • Command: a requested action, such as creating a student. It can be rejected.
  • Event: an immutable record of something that has happened, such as StudentCreated.
  • Tag: an association that groups related events so the system can find a student’s history later.
  • Projector and state reconstruction: the step that folds tagged events into the state a query needs.

Keeping these four apart prevents the most common confusion in event sourcing, which is treating the event store as if it were a conventional table.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Options beyond Native C#

The article mentions three approaches but walks through only one. The comparison below uses the axes the tutorial and the Zenn follow-up support. Where the sources do not state a value, the cell says so.

Approach Runtime and deployment model Status as reported Walked through in the introduction
DCB Native (C#) Generated .NET solution run through the Aspire AppHost Used in the sample; template status not stated as current Yes
DCB Wasm Not stated Mentioned by the article; availability not stated No
Sekiban Cloud Not stated Described as under development and unreleased when the introduction was written (2026-09-10); not a current status claim No

If you are choosing an approach today, verify each row against the current Sekiban documentation rather than against this table.

What this sample does and does not establish

  • It is one developer’s first-hand tutorial. It shows how the pieces fit together; it is not a benchmark, and it does not measure throughput, latency, or consistency under load.
  • The DEV Community copy is a secondary rendering of the same article, so it corroborates the text but not the author’s experience.
  • The sample’s storage behavior is not a guarantee that every configuration behaves identically. The listed backends (Azure Cosmos DB, PostgreSQL, and AWS DynamoDB) should each be tested under your own workload before you assume equivalence.
  • The tutorial does not cover event schema evolution, snapshots, or failure recovery in depth, so those questions remain open for your design.

Where the series goes next

A follow-up Zenn article, the Implementation Edition published on 2026-09-10, adds a StudentProfileUpdated event. It shows the student’s state being evolved by a projector while the earlier events stay in the event store. The introduction itself focuses on setup and the initial create and retrieve flows, but the follow-up is the clearest demonstration of the event-history principle in the series.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sources

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

.NETC++CQRSDynamic Consistency Boundaryevent sourcingSekiban

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.