Click or drag to resize
IDataConnection Interface
Data connection interface that must be implemented by data providers.

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 10.0.0
Syntax
C#
public interface IDataConnection : IDisposable

The IDataConnection type exposes the following members.

Properties
  NameDescription
Public propertyCommandTimeout
Command timeout which will be set on this connection.
Public propertyConnectionString
Connection string for specific provider.
Public propertyConnectionStringName
Connection string for specific provider.
Public propertyDisableConnectionDebug
If true, the debug is disabled on this connection
Public propertyDisableQueryDebug
If true, the debug of queries is disabled on this connection
Public propertyKeepOpen
If true, the connection stays open even if close is requested.
Public propertyNativeConnection
Native connection object. It depends on provider type.
Public propertyTransaction
Transaction object.
Public propertyUseScopeConnection
If true, the connection uses the scope connection
Top
Methods
  NameDescription
Public methodBeginTransaction
Begins a new transaction.
Public methodBeginTransaction(IsolationLevel)
Begins a new transaction with specified isolation level.
Public methodBulkInsert
Performs a bulk insert of the data into a target database table
Public methodClose
Closes connection to the database.
Public methodCommitTransaction
Commits current transaction.
Public methodExecuteNonQuery
Executes the query and returns the number of rows affected.
Public methodExecuteNonQueryAsync

An asynchronous version of ExecuteNonQuery(String, QueryDataParameters, QueryTypeEnum, Boolean) which executes the query asynchronously and returns the number of rows affected.

The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.

Public methodExecuteQuery
Returns result of the query.
Public methodExecuteReader
Executes the query and returns result as a DbDataReader.
Public methodExecuteReaderAsync

An asynchronous version of ExecuteReader(String, QueryDataParameters, QueryTypeEnum, CommandBehavior) which executes the query asynchronously and returns result as a DbDataReader.

The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.

Public methodExecuteScalar
Executes the query and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
Public methodExecuteScalarAsync

An asynchronous version of ExecuteScalar(String, QueryDataParameters, QueryTypeEnum, Boolean), which executes the query asynchronously and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.

The cancellation token can be used to request that the operation be abandoned before the command timeout elapses. Exceptions will be reported via the returned Task object.

Public methodGetExecutingConnection
Gets the connection that executes the given query
Public methodGetXmlSchema
Returns XML schema for specified table.
Public methodIsOpen
Returns true if connection to the database is open.
Public methodIsTransaction
Indicates if transaction is running.
Public methodNativeConnectionExists
Returns true if the native connection exists.
Public methodNativeDBConnectionExists
Returns true if the native connection exists.
Public methodOpen
Opens connection to the database.
Public methodRollbackTransaction
Rollbacks current transaction.
Top
See Also