Table of Contents

AddEventSourcing Method

Definition

Namespace
Savvyio.Extensions.EFCore.Domain.EventSourcing
Assemblies
Savvyio.Extensions.EFCore.Domain.EventSourcing.dll
Source
src/Savvyio.Extensions.EFCore.Domain.EventSourcing/ModelBuilderExtensions.cs

AddEventSourcing<TEntity, TKey>(ModelBuilder, Action<EfCoreTracedAggregateEntityOptions>)

Adds a default implementation of an EF Core compatible Event Sourcing model.

public static ModelBuilder AddEventSourcing<TEntity, TKey>(this ModelBuilder mb, Action<EfCoreTracedAggregateEntityOptions> setup = null) where TEntity : class, ITracedAggregateRoot<TKey>

Parameters

mb ModelBuilder

The ModelBuilder to extend.

setup Action<EfCoreTracedAggregateEntityOptions>

The EfCoreTracedAggregateEntityOptions which may be configured.

Returns

ModelBuilder

A reference to mb so that additional configuration calls can be chained.

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.