Table of Contents

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
object
DataConnectionFactory

Properties

ProviderObject

Returns the provider object.

public static IDataProvider ProviderObject { get; }

Property Value

IDataProvider

TableManagerObject

Returns the Table manager object.

public static ITableManager TableManagerObject { get; }

Property Value

ITableManager

Methods

GetConnection()

Returns a new database connection.

public static IDataConnection GetConnection()

Returns

IDataConnection

GetConnection(string)

Returns a new database connection.

public static IDataConnection GetConnection(string connectionString)

Parameters

connectionString string

Connection string

Returns

IDataConnection

GetNativeConnection(string, bool)

Returns a new database connection.

public static IDataConnection GetNativeConnection(string connectionString, bool newConnection = false)

Parameters

connectionString string

Connection string

newConnection bool

If true, a new connection instance is created

Returns

IDataConnection

NewTableManagerObject(string)

Creates a new table manager object with the given connection string

public static ITableManager NewTableManagerObject(string connectionString)

Parameters

connectionString string

Connection string

Returns

ITableManager

Events

OnGetConnection

Event raised when the connection is required. Returns the connection.

public static event DataConnectionFactory.GetConnectionEventHandler OnGetConnection

Event Type

DataConnectionFactory.GetConnectionEventHandler