Table of Contents

Namespace Savvyio.Extensions.DependencyInjection.EFCore.Domain.EventSourcing

Assembly: Savvyio.Extensions.DependencyInjection.EFCore.Domain.EventSourcing.dll

Event sourcing with EF Core requires a dedicated repository that writes traced domain events. The Savvyio.Extensions.DependencyInjection.EFCore.Domain.EventSourcing namespace provides AddEfCoreTracedAggregateRepository<TEntity, TKey> and AddEfCoreTracedAggregateRepository<TEntity, TKey, TMarker> to register this repository.

Start with AddEfCoreTracedAggregateRepository<TEntity, TKey> to bind ITracedAggregateRepository to EfCoreTracedAggregateRepository. Choose this namespace when your domain uses event sourcing and stores aggregate history as a sequence of immutable traced events in a relational database; for standard non-event-sourced aggregates with EF Core, use Savvyio.Extensions.DependencyInjection.EFCore.Domain instead. Pair with Savvyio.Extensions.EFCore.Domain.EventSourcing which provides the ModelBuilder extension to create the event-store schema in OnModelCreating.

Availability: .NET 10 and .NET 9

Extension Members

Type Ext Methods
IServiceCollection ⬇️ AddEfCoreTracedAggregateRepository<TEntity, TKey>, AddEfCoreTracedAggregateRepository<TEntity, TKey, TMarker>

Classes

EfCoreTracedAggregateRepository<TEntity, TKey, TMarker>

Provides an implementation of the EfCoreTracedAggregateRepository<TEntity, TKey> that is optimized for Domain Driven Design and Event Sourcing.

ServiceCollectionExtensions

Extension methods for the IServiceCollection interface.