To update an entity in a Sekiban DCB application, you do not overwrite a row. You add a new tagged event, such as StudentProfileUpdated, after a command handler has checked the change against the entity’s current state. Projectors then have to apply that event, or the detail view and the list view will keep showing the old data. The Zenn walkthrough by its author, published 2026-09-10 and updated 2026-09-16, builds this step by step on a student and classroom sample. This article follows the same path and explains the reasoning behind each piece, along with the DCB background that makes it work.
What the starting sample already does
The walkthrough starts from a working Sekiban DCB sample. It already creates students, reads a single student and a list of students, and enrolls or drops students from classes. The student state holds four things: an ID, a name, an enrollment limit (MaxClassCount), and the list of enrolled class IDs (EnrolledClassRoomIds).
As an Amazon Associate I earn from qualifying purchases.
The new capability is narrow. It changes the name and the enrollment limit. It must keep the student’s identity and existing enrollments intact.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The update rules
The walkthrough defines the rules before writing any code. They are the contract the rest of the implementation enforces.
#1 Best Overall
| Field or case | Rule |
|---|---|
| Name | Required; 1 to 100 characters |
| Maximum class count | Integer from 1 to 10, and not less than the current number of enrolled classes |
| Nonexistent student | Rejected |
| Student ID | Unchanged |
| Enrolled class IDs | Unchanged by this operation |
The capacity rule is the one that needs current state. A request to set the limit to 2 is valid for a student with one enrollment and invalid for a student with three. The command cannot judge that from the request alone, which is why the design reads state first.
Modeling the change as an event
The change is recorded as an event named StudentProfileUpdated. It carries three values: the student ID, the new name, and the new limit. It implements IEventPayload and returns a StudentTag for the student it belongs to.
The event does not include the enrollment list. The operation does not change enrollments, so recording them would suggest a change that did not happen. Keeping the event narrow also makes it easier to reason about during replay: the event says exactly what changed and nothing else.
The command handler: decide before you write
The UpdateStudent command handles the decision. Its steps run in this order:
Rank #2
- Validation attributes check the name length and the class-count range before the handler’s logic runs.
- The handler reads the current state through the student’s tag using
GetStateAsync<StudentProjector>(tag). - If no student exists for that tag, the handler rejects the request.
- The decider compares the requested class count with
EnrolledClassRoomIds.Countand rejects a value below the current enrollment. - When the request passes, the handler returns a
StudentProfileUpdatedevent. The decider’s evolve step changes onlyNameandMaxClassCount.
The handler does not write to the database. Sekiban takes the returned event and persists it. This separation keeps business rules in one place and leaves storage to the framework.
The walkthrough describes this as a read, decide, and return flow. How the event store enforces that the state was not changed by another writer between the read and the append is a framework and provider detail that the walkthrough does not cover. Check the provider documentation before relying on it for concurrent updates.
Updating the projections
Accepting and storing an event does not update any read model on its own. Each projection must handle the new event. The walkthrough adds a case for StudentProfileUpdated in two places.
The individual student projector
The detail projector applies the update so that loading one student returns the new name and limit. Because the projector is driven by events, replaying the stream from the beginning rebuilds the same changed profile.
The student list projection
The list projection applies the same event, so the list reflects the new name and limit without a separate write path. The walkthrough treats the two projections as independent: each one must handle the event for its own view to change.
The API endpoint
The walkthrough exposes the command through POST /api/students/update. The endpoint runs the command through ISekibanExecutor. On success it returns four values: the student ID, the event ID, a sortable unique ID, and a success message.
Why validation and projection are separate jobs
The central lesson of the walkthrough is that deciding whether a change is allowed and updating what users see are different responsibilities. The command validates against the current state. The projectors decide how events look in each view. A missing projector case does not stop the event from being stored, which means a bug can appear as stale data rather than as an error. Test each view after adding an event type.
The PostgreSQL example reported by the author
The walkthrough shows a PostgreSQL dcb_events table with two records for the same student tag. The first is the creation event. The second is the StudentProfileUpdated event. The author reports that applying the update produces the new name and the new capacity. This is the author’s reported example. The sources reviewed for this article do not include an independent run of it.
Rank #4
How DCB tags and conditional appends fit
The DCB specification defines the minimum an event store must provide to be DCB compliant. It requires reads that can filter by event type, by tags, or by both. It also requires appends that can carry an optional condition.
In the specification, an event has a type, data, and tags. A query item matches a given type and all tags listed in that item. Sequence positions must be deterministic and may contain gaps. The append condition must fail when events matching the condition already exist. That rule protects the decision made between reading state and appending a change.
The official DCB overview explains why tags matter. One event can affect several entities or concepts in one bounded context. A decision can query events relevant to both a student and a course and then append conditionally against that same query. That design supports cross-entity rules without giving every entity its own stream. This describes the DCB model. It is not a guarantee that every storage provider has identical mechanics.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Current Sekiban status
As of 7 October 2026, the official Sekiban repository on GitHub makes these points. Check them again before you start a project, because package names, templates, and lifecycle labels change.
Best Value
- It recommends Sekiban DCB for new projects.
- It labels Sekiban.Pure and Sekiban.Core as maintenance mode.
- It lists event-store packages for PostgreSQL, Cosmos DB, and DynamoDB, snapshot support for Azure Blob Storage and S3, and Orleans integrations.
- It describes Sekiban as an event-sourcing and CQRS framework for .NET, developed by J-Tech Japan since 2022.
- It is licensed under Apache 2.0.
- It lists a maintainer contact for training and support.
Getting started
The repository’s current quick start uses two commands:
dotnet new install Sekiban.Dcb.Templates
dotnet new sekiban-dcb-orleans -n YourProjectName
The Orleans template gives you the hosting model that the repository’s Orleans integrations use. Pick the event-store package that matches your database and check that package’s current documentation for setup.
Other DCB implementations
If you are comparing DCB options rather than following this walkthrough, name the layer you are comparing. The DCB libraries directory lists Axon Server as a commercial event store with DCB support, and Sekiban.Dcb as a C# option that runs on Orleans. These are not like-for-like comparisons. The sources reviewed do not state the values below for either product, so the cells are marked accordingly.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall| Axis | Sekiban.Dcb | Axon Server |
|---|---|---|
| Language or runtime | C# on .NET | Not stated in the sources reviewed |
| Event-store provider | PostgreSQL, Cosmos DB, DynamoDB packages listed in the repository | Not stated in the sources reviewed |
| Hosting model | Orleans integration | Not stated in the sources reviewed |
| Storage consistency contract | Not stated in the sources reviewed beyond the DCB specification | Not stated in the sources reviewed beyond the DCB specification |
| Deployment model | Not stated in the sources reviewed | Commercial product |
| Project maturity | Developed by J-Tech Japan since 2022; recommended for new projects | Not stated in the sources reviewed |
Scope of this walkthrough
The author built the feature one stage at a time with Codex, checking each stage before moving on rather than asking for the whole feature at once. That is the author’s account of the process. The sources reviewed for this article did not include independent testing of the code, so treat the implementation as a worked example to adapt, not a verified reference.
The walkthrough covers one entity and one kind of update. It does not cover deleting students, changing enrollments through the update path, concurrency conflicts, or migrating existing events.
Quick Recap
“
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.




