Class EventStoreEntity<TEventEntity>
The stored entity that contain/references all the events applied to a domain entity.
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.EventStore
Assembly: Silverback.EventSourcing.dll
Syntax
public class EventStoreEntity<TEventEntity> : MessagesSource<object>, IMessagesSource, IEventStoreEntity<TEventEntity> where TEventEntity : IEventEntity
Type Parameters
Name | Description |
---|---|
TEventEntity | The type of the related event entity that will be referenced. |
Remarks
Used to implement the domain entities and automatically publish their events when the entity is saved to the underlying database.
Properties
| Improve this doc View sourceEntityVersion
Gets or sets the version of the entity.
Declaration
public int EntityVersion { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
In the default implementation this is a sequence that is increment every time a new event is applied.
Events
Gets the events that have been applied to the domain entity.
Declaration
public ICollection<TEventEntity> Events { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.ICollection<TEventEntity> |
Methods
| Improve this doc View sourceAddDomainEvents(IEnumerable<Object>)
Adds the specified events.
Declaration
public void AddDomainEvents(IEnumerable<object> events)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Object> | events | The events to be stored. |