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
mbModelBuilderThe ModelBuilder to extend.
setupAction<EfCoreTracedAggregateEntityOptions>The EfCoreTracedAggregateEntityOptions which may be configured.
Returns
- ModelBuilder
A reference to
mbso that additional configuration calls can be chained.
Type Parameters
TEntityThe type of the entity that implements the ITracedAggregateRoot<TKey> interface.
TKeyThe type of the key that uniquely identifies the entity.