Table of Contents

Namespace Savvyio.Extensions.DependencyInjection.EFCore.Domain

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

Aggregate roots require their own context boundary. The Savvyio.Extensions.DependencyInjection.EFCore.Domain namespace provides AddEfCoreAggregateDataSource<TMarker> and AddEfCoreAggregateRepository<TEntity, TKey> to register EF Core persistence for aggregate roots.

Start with AddEfCoreAggregateDataSource<TMarker> to configure the DbContext as a domain data source. Then add AddEfCoreAggregateRepository<TEntity, TKey> for each aggregate root type. For event-sourced aggregates, use Savvyio.Extensions.DependencyInjection.EFCore.Domain.EventSourcing.

Availability: .NET 10 and .NET 9

Extension Members

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

Classes

EfCoreAggregateDataSource<TMarker>

Provides an implementation of the EfCoreDataSource that is optimized for Domain Driven Design and the concept of Aggregate Root.

EfCoreAggregateRepository<TEntity, TKey, TMarker>

Provides an implementation of the EfCoreRepository<TEntity, TKey> that is optimized for Domain Driven Design.

ServiceCollectionExtensions

Extension methods for the IServiceCollection interface.