EventActions Type
C#-friendly factory methods for EventAction
Static members
| Static member | Description |
|
|
|
|
|
|
Full Usage:
EventActions.PersistAll(events)
Parameters:
'TEvent[]
Returns: EventAction<'TEvent>
|
|
Full Usage:
EventActions.PersistAndSnapshot(event)
Parameters:
'TEvent
Returns: EventAction<'TEvent>
|
|
Full Usage:
EventActions.PersistConditionally(shouldPersist, event)
Parameters:
bool
event : 'TEvent
Returns: EventAction<'TEvent>
|
Persist the event when `shouldPersist` is true; otherwise Defer it - the event is still returned to the caller (so read-your-writes observes it) but not written to the journal. The idempotent "emit this verdict, but only write it once" shape, e.g. re-approving an already-approved aggregate: `PersistConditionally(state.Approval != Approved, new Approved(id))`.
|
FCQRS