Class ServiceCollectionExtensions
- Assembly
- Savvyio.Extensions.DependencyInjection.Domain.dll
Extension methods for the IServiceCollection interface.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
Methods
AddTracedAggregateRepository<TService, TEntity, TKey>(IServiceCollection, Action<ServiceOptions>)
Adds an implementation of ITracedAggregateRepository<TEntity, TKey> to the specified IServiceCollection.
public static IServiceCollection AddTracedAggregateRepository<TService, TEntity, TKey>(this IServiceCollection services, Action<ServiceOptions> setup = null) where TService : class, ITracedAggregateRepository<TEntity, TKey> where TEntity : class, ITracedAggregateRoot<TKey>
Parameters
servicesIServiceCollectionThe IServiceCollection to add the service to.
setupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional configuration calls can be chained.
Type Parameters
TServiceThe type of the ITracedAggregateRepository<TEntity, TKey> interface to add.
TEntityThe type of the entity.
TKeyThe type of the key that uniquely identifies the entity.
Remarks
If the underlying type of TService implements IDependencyInjectionMarker<TMarker> interface then this is automatically handled. Also, the implementation will be type forwarded accordingly.
- See Also
-
IDependencyInjectionMarker<TMarker>ITracedAggregateRepository<TEntity, TKey>ITracedAggregateRepository<TEntity, TKey, TMarker>IWritableRepository<TEntity, TKey>IWritableRepository<TEntity, TKey, TMarker>IReadableRepository<TEntity, TKey>IReadableRepository<TEntity, TKey, TMarker>