Table of Contents

Class ModelBuilderExtensions

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

Extension methods for the ModelBuilder class.

public static class ModelBuilderExtensions
Inheritance
ModelBuilderExtensions

Methods

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.