Nucleus .Net Core CMS

DataProvider Class

Namespace: Nucleus.Data.EntityFramework
Assembly: Nucleus.Data.EntityFramework.dll
Base class used by entity-framework data providers.
Nucleus core and module data provider which use entity framework classes inherit this class, which contains an implementation of the schema migration functions. Data provider implementations which register a related DataProviderMigration class must inherit this class.
DataProvider (DbContext context, ILogger<DataProvider> logger)
Constructor.
Parameters
Name Type
context Nucleus.Data.EntityFramework.DbContext
logger Microsoft.Extensions.Logging.ILogger<Nucleus.Data.EntityFramework.DataProvider>
Entity framework DbContext.
Logger used to log messages.
CheckConnection ()
Attempts a connection to the database. Throws a database provider specific exception if not successful.
GetDatabaseKey ()
Get the key for the database which corresponds to a section in the database configuration settings file.