DataProviderExtensions Class
Namespace: Nucleus.Data.Common
Assembly: Nucleus.Data.Common.dll
Common data provider dependency injection registration extension methods.
Fields
_cachedDatabaseProviders
Field
Cache for list of types which implement IDatabaseProvider. These are cached so that we don't iterate assemblies and types multiple times during startup (every time AddDataProvider is called).
Methods
GetDatabaseProviders
GetDatabaseProviders ()
Find IDatabaseProvider implementations.
AddDataProvider<TDataProvider>
(IServiceCollection,IConfiguration) Method
AddDataProvider<TDataProvider> (IServiceCollection services, IConfiguration configuration)
Add data provider objects to the service collection for the data provider specified by TDataProvider. This overload uses the default schema name for the data provider type.
AddDataProvider<TDataProvider>
(IServiceCollection,IConfiguration,String) Method
AddDataProvider<TDataProvider> (IServiceCollection services, IConfiguration configuration, String schemaName)
Add data provider objects to the service collection for the data provider specified by TDataProvider. This overload allows callers to specify their schema name instead of using the default.
AddDataProvider<TDataProvider>
(IServiceCollection,IConfiguration,String,Boolean) Method
AddDataProvider<TDataProvider> (IServiceCollection services, IConfiguration configuration, String schemaName, Boolean canUseDefault)
Add data provider objects to the service collection for the data provider specified by TDataProvider. This overload allows callers to specify their schema name instead of using the default.
AddDataProviderFactory
(IServiceCollection,IConfiguration) Method
AddDataProviderFactory (IServiceCollection services, IConfiguration configuration)
Add the default data provider factory to the services collection.
CleanupDataProviderExtensions
(IServiceCollection) Method
CleanupDataProviderExtensions (IServiceCollection services)
Clear cache after startup to save memory.
GetDefaultSchemaName
(Type) Method
GetDefaultSchemaName (Type type)
Return the default namespace for a type.