Skip to content

Interface IAggregate

Namespace: Cephalon.Abstractions.EventSourcing
Assembly: Cephalon.Abstractions.dll

Applies domain events to an aggregate state projection.

public interface IAggregate<TState>

TState

The state shape produced by the aggregate.

Applies one event to the current state and returns the next state snapshot.

TState Apply(TState current, IDomainEvent evt)

current TState

The current aggregate state.

evt IDomainEvent

The event to apply.

TState

The updated aggregate state.