AddEfCoreDataStore Method
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection.EFCore
- Assemblies
- Savvyio.Extensions.DependencyInjection.EFCore.dll
AddEfCoreDataStore<T>(IServiceCollection, Action<ServiceOptions>)
Adds an implementation of EfCoreDataStore<T> to the specified IServiceCollection.
public static IServiceCollection AddEfCoreDataStore<T>(this IServiceCollection services, Action<ServiceOptions> setup = null) where T : class
Parameters
servicesIServiceCollectionThe IServiceCollection to add the service to.
setupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Type Parameters
TThe type of the DTO.
Exceptions
- ArgumentNullException
servicescannot be null.
AddEfCoreDataStore<T, TMarker>(IServiceCollection, Action<ServiceOptions>)
Adds an implementation of EfCoreDataStore<T> to the specified IServiceCollection.
public static IServiceCollection AddEfCoreDataStore<T, TMarker>(this IServiceCollection services, Action<ServiceOptions> setup = null) where T : class
Parameters
servicesIServiceCollectionThe IServiceCollection to add the service to.
setupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Type Parameters
TThe type of the DTO.
TMarkerThe type used to mark the implementation that this data access object represents. Optimized for Microsoft Dependency Injection.
Exceptions
- ArgumentNullException
servicescannot be null.