FCQRS
FCQRS runs event-sourced applications on Akka.NET, with F# and C# APIs. Your code decides which events to save and how they change state. FCQRS stores those events and rebuilds state after a restart.
Register a user shows the code and runs it with SQLite on .NET 10.
Follow one registration
RegisterUser("Alice")asks one account to register a name. This request is a command.- The account's rule checks its current state and returns
UserRegistered("Alice"), an event. - FCQRS stores that event in the journal, the account's event history, and applies it to state.
- A projection reads the saved event and fills a query view. The sample queries that view for Alice's name.
The account's state and rules form an aggregate. Its commands run one at a time; different accounts can run independently. A query view updates asynchronously, so the sample waits for that view before reading it.
Continue with a task
- Try another registration: change the name and account ID.
- Query a registered user: see the projection and runtime setup.
- Test your domain: check registration and replay without a database.
- Register over HTTP, optional: add POST and GET endpoints.
- Task guides: add durable query storage, workflows, or operational configuration.
- Concepts: understand the guarantees and their boundaries.
When to use FCQRS
FCQRS is useful when several callers can change the same entity, decisions depend on its history, or workflows must recover after a restart. It adds an event journal, asynchronous query views, and an actor runtime to operate. For an application that only edits and reads rows, a conventional database application may need less infrastructure.