Header menu logo FCQRS

Aggregate<'State, 'Command, 'Event> Type

A pure aggregate definition: the four things that define an event-sourced aggregate. No wiring, no IActor.

Record fields

Record Field Description

Decide

Full Usage: Decide

Field type: Command<'Command> -> 'State -> EventAction<'Event>

handleCommand (decide): command + current state -> what to do.

Field type: Command<'Command> -> 'State -> EventAction<'Event>

Fold

Full Usage: Fold

Field type: Event<'Event> -> 'State -> 'State

applyEvent (fold): event + current state -> next state (pure).

Field type: Event<'Event> -> 'State -> 'State

Initial

Full Usage: Initial

Field type: 'State
Field type: 'State

Name

Full Usage: Name

Field type: string
Field type: string

Snapshots

Full Usage: Snapshots

Field type: SnapshotPolicy

Snapshot cadence: Default (config / 30), NoSnapshots, or Every n.

Field type: SnapshotPolicy

Type something to start searching.