Nucleus .Net Core CMS

DataProviderFactory Class

Namespace: Nucleus.Data.Common
Assembly: Nucleus.Data.Common.dll
Data provider factory base class. Provides common functionality for data providers.

Constructor

Nucleus.Data.Common.DataProviderFactory Constructor

Nucleus.Data.Common.DataProviderFactory (System.IServiceProvider,  Microsoft.Extensions.Logging.ILogger{Nucleus.Data.Common.DataProviderFactory})
Constructor (called by DI)

Methods

CreateProvider<TDataProvider>

CreateProvider<TDataProvider> ()
Create a new instance of the specified data provider interface, after checking whether migration scripts need to be applied.
Type Parameters
TDataProvider
Returns
A data provider instance of the specified type.
Remarks
If migration scripts exist which have not been applied, scripts are automatically executed before returning the data provider object. Migration script checks are not run again until after a restart.