Class EventSourcingDomainEntity<TKey>
The base class for the domain entities that are persisted in the event store.
Inheritance
System.Object
MessagesSource<System.Object>
EventSourcingDomainEntity<TKey, System.Object>
EventSourcingDomainEntity<TKey>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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()
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 |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<IEntityEvent> | events | The stored events to be re-applied to rebuild the entity state. |