Nucleus .Net Core CMS

IDatabaseProvider Interface

Namespace: Nucleus.Data.Common
Assembly: Nucleus.Data.Common.dll
Data provider configuration interface.
AddDataProvider<TDataProvider> (IServiceCollection services, DatabaseConnectionOption options, String schemaName)
Add data provider objects to the service collection for the data provider specified by TDataProvider if configuration contains an entry specifying that the data provider uses the database provider implementing this interface.
Type Parameters
TDataProvider
CreateConnection (String connectionString)
Get a database connection for the specified connection string.
Parameters
Name Type
connectionString String
Remarks
This method is used for special cases, where the caller needs a database connection that is not managed by Entity Framework, such as for low-level database operations or cases where the caller needs to use System.Data methods without results being bound to entities (classes).
GetDatabaseInformation (DatabaseConnectionOption options, String schemaName)
Return database diagnostics information if configuration contains an entry specifying that the data provider uses the database provider implementing this interface.
ListDatabases (String connectionString)
Return a list of available databases. This method is used by the setup wizard.
Parameters
Name Type
connectionString String
TestConnection (String connectionString)
Test database connection.
Parameters
Name Type
connectionString String
TypeKey ()
Database provider type key.
Remarks
This value is used to represent the database provider in the database configuration file 'Type' property.