Interface IDomainEvent
- Namespace
- Compendium.Core.Domain.Events
- Assembly
- Compendium.Core.dll
Represents a domain event that occurred within the domain. Domain events are used to communicate changes within the same bounded context.
public interface IDomainEvent
Properties
AggregateId
Gets the identifier of the aggregate that raised the event.
string AggregateId { get; }
Property Value
AggregateType
Gets the type name of the aggregate that raised the event.
string AggregateType { get; }
Property Value
AggregateVersion
Gets the version of the aggregate when the event was raised.
long AggregateVersion { get; }
Property Value
EventId
Gets the unique identifier of the event.
Guid EventId { get; }
Property Value
EventVersion
Gets the version of the event schema. This allows for event schema evolution while maintaining backward compatibility. Default value is 1 for events created before versioning was introduced.
int EventVersion { get; }
Property Value
OccurredOn
Gets the timestamp when the event occurred.
DateTimeOffset OccurredOn { get; }