AddEfCoreDataSource Method
Definition
- Namespace
- Savvyio.Extensions.DependencyInjection.EFCore
- Assemblies
- Savvyio.Extensions.DependencyInjection.EFCore.dll
AddEfCoreDataSource(IServiceCollection, Action<EfCoreDataSourceOptions>, Action<ServiceOptions>)
Adds an EfCoreDataSource implementation to the specified IServiceCollection.
public static IServiceCollection AddEfCoreDataSource(this IServiceCollection services, Action<EfCoreDataSourceOptions> dataSourceSetup, Action<ServiceOptions> serviceSetup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to extend.
dataSourceSetupAction<EfCoreDataSourceOptions>The EfCoreDataSourceOptions which need to be configured.
serviceSetupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Remarks
The implementation will be type forwarded accordingly.
Exceptions
- ArgumentNullException
servicescannot be null.
AddEfCoreDataSource<TMarker>(IServiceCollection, Action<EfCoreDataSourceOptions<TMarker>>, Action<ServiceOptions>)
Adds an EfCoreDataSource<TMarker> implementation to the specified IServiceCollection.
public static IServiceCollection AddEfCoreDataSource<TMarker>(this IServiceCollection services, Action<EfCoreDataSourceOptions<TMarker>> dataSourceSetup, Action<ServiceOptions> serviceSetup = null)
Parameters
servicesIServiceCollectionThe IServiceCollection to extend.
dataSourceSetupAction<EfCoreDataSourceOptions<TMarker>>The EfCoreDataSourceOptions<TMarker> which need to be configured.
serviceSetupAction<ServiceOptions>The ServiceOptions which may be configured.
Returns
- IServiceCollection
A reference to
servicesso that additional calls can be chained.
Type Parameters
TMarkerThe type used to mark the implementation that this data source represents. Optimized for Microsoft Dependency Injection.
Remarks
The implementation will be type forwarded accordingly.
Exceptions
- ArgumentNullException
servicescannot be null.