Class DataConnectionFactory
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Provides DataConnection object for specified data provider according to configuration settings.
public static class DataConnectionFactory
- Inheritance
-
objectDataConnectionFactory
Properties
ProviderObject
Returns the provider object.
public static IDataProvider ProviderObject { get; }
Property Value
TableManagerObject
Returns the Table manager object.
public static ITableManager TableManagerObject { get; }
Property Value
Methods
GetConnection()
Returns a new database connection.
public static IDataConnection GetConnection()
Returns
GetConnection(string)
Returns a new database connection.
public static IDataConnection GetConnection(string connectionString)
Parameters
connectionStringstringConnection string
Returns
GetNativeConnection(string, bool)
Returns a new database connection.
public static IDataConnection GetNativeConnection(string connectionString, bool newConnection = false)
Parameters
connectionStringstringConnection string
newConnectionboolIf true, a new connection instance is created
Returns
NewTableManagerObject(string)
Creates a new table manager object with the given connection string
public static ITableManager NewTableManagerObject(string connectionString)
Parameters
connectionStringstringConnection string
Returns
Events
OnGetConnection
Event raised when the connection is required. Returns the connection.
public static event DataConnectionFactory.GetConnectionEventHandler OnGetConnection