Table of Contents

Class EfCoreTracedAggregateEntity<TEntity, TKey>

Namespace
Savvyio.Extensions.EFCore.Domain.EventSourcing
Assembly
Savvyio.Extensions.EFCore.Domain.EventSourcing.dll

Provides a generic way for EF Core to surrogate and support an implementation of ITracedAggregateRoot<TKey>.

public class EfCoreTracedAggregateEntity<TEntity, TKey> : ITracedAggregateRoot<TKey>, IAggregateRoot<ITracedDomainEvent>, IAggregateRoot, IMetadata, IEntity<TKey>, IIdentity<TKey> where TEntity : class, IEntity<TKey>, ITracedAggregateRoot<TKey>

Type Parameters

TEntity

The type of the entity that implements the ITracedAggregateRoot<TKey> interface.

TKey

The type of the key that uniquely identifies the entity.

Inheritance
EfCoreTracedAggregateEntity<TEntity, TKey>
Implements
IEntity<TKey>
IIdentity<TKey>
Extension Methods

Constructors

EfCoreTracedAggregateEntity(TEntity, ITracedDomainEvent, IMarshaller)

Initializes a new instance of the EfCoreTracedAggregateEntity<TEntity, TKey> class.

public EfCoreTracedAggregateEntity(TEntity aggregate, ITracedDomainEvent domainEvent, IMarshaller marshaller)

Parameters

aggregate TEntity

The traced aggregate to convert into this EF Core compatible instance.

domainEvent ITracedDomainEvent

The traced domain event to convert into this EF Core compatible instance.

marshaller IMarshaller

The IMarshaller that is used when converting ITracedDomainEvent into a serialized format.

Properties

Id

Gets the value of the identifier associated with an aggregate.

public TKey Id { get; }

Property Value

TKey

The value of the identifier associated with an aggregate.

Payload

Gets the payload of the traced domain event.

public byte[] Payload { get; }

Property Value

byte[]

The payload of the traced domain event.

Timestamp

Gets the timestamp of the traced domain event.

public DateTime Timestamp { get; }

Property Value

DateTime

The timestamp of the traced domain event.

Type

Gets the CLR type of the traced domain event.

public string Type { get; }

Property Value

string

The CLR type of the traced domain event.

Version

Gets the version of the aggregate from the traced domain event.

public long Version { get; }

Property Value

long

The version of the aggregate from the traced domain event.

See Also