Class EventSourcingDomainEntity<TKey>
The base class for the domain entities that are persisted in the event store.
Inherited Members
Namespace: Silverback.Domain
Assembly: Silverback.EventSourcing.dll
Syntax
public abstract class EventSourcingDomainEntity<TKey> : EventSourcingDomainEntity<TKey, object>, IMessagesSource, IEventSourcingDomainEntity<TKey>, IEventSourcingDomainEntity
Type Parameters
Name | Description |
---|---|
TKey | The type of the entity key. |
Remarks
It's not mandatory to use this base class as long as long as the domain entities implement the IEventSourcingDomainEntity<TKey> interface.
Constructors
| Improve this doc View sourceEventSourcingDomainEntity()
Initializes a new instance of the EventSourcingDomainEntity<TKey> class.
Declaration
protected EventSourcingDomainEntity()
Remarks
It's not mandatory to use this base class as long as long as the domain entities implement the IEventSourcingDomainEntity<TKey> interface.
EventSourcingDomainEntity(IReadOnlyCollection<IEntityEvent>)
Initializes a new instance of the EventSourcingDomainEntity<TKey> class from the stored events.
Declaration
protected EventSourcingDomainEntity(IReadOnlyCollection<IEntityEvent> events)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<IEntityEvent> | events | The stored events to be re-applied to rebuild the entity state. |
Remarks
It's not mandatory to use this base class as long as long as the domain entities implement the IEventSourcingDomainEntity<TKey> interface.