IDatabaseProvider

Ecng.Data

Factory for creating database connections and table accessors.

方法

CreateConnection
public IDatabaseConnection CreateConnection(DatabaseConnectionPair pair)
result = iDatabaseProvider.CreateConnection(pair)

Creates a database connection from the specified connection settings.

pair
Database connection settings.

返回值: A database connection instance.

GetTable
public IDatabaseTable GetTable(IDatabaseConnection connection, string tableName)
result = iDatabaseProvider.GetTable(connection, tableName)

Gets a table accessor for the specified table.

connection
Database connection.
tableName
Table name.

返回值: Table accessor with DDL and DML operations.