Table of Contents

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

string

AggregateType

Gets the type name of the aggregate that raised the event.

string AggregateType { get; }

Property Value

string

AggregateVersion

Gets the version of the aggregate when the event was raised.

long AggregateVersion { get; }

Property Value

long

EventId

Gets the unique identifier of the event.

Guid EventId { get; }

Property Value

Guid

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

int

OccurredOn

Gets the timestamp when the event occurred.

DateTimeOffset OccurredOn { get; }

Property Value

DateTimeOffset