[]
        
(Showing Draft Content)

C1.DataConnector.AdoNet.DbCommandWrap-3

DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter> Class

DBCommand Wrap class that uses to custom a data provider for a specific data source.

Inheritance
DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter>
Namespace: C1.DataConnector.AdoNet
Assembly: C1.AdoNet.D365S.dll
Syntax
public abstract class DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter> : DbCommand, IComponent, IDbCommand, IDisposable, IAsyncDisposable where TInnerConnection : DbConnection, new() where TInnerCommand : DbCommand, new() where TInnerParameter : DbParameter
Type Parameters
Name Description
TInnerConnection
TInnerCommand
TInnerParameter

Constructors

Name Description
DbCommandWrap()

The default constructor of DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter>.

DbCommandWrap(DbConnectionWrap<TInnerConnection, TInnerCommand, TInnerParameter>)

The constructor of DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter> given a DbConnectionWrap<TInnerConnection, TInnerCommand, TInnerParameter>.

Fields

Name Description
Logger

The logger where the runtime messages are passed to.

Properties

Name Description
CommandText

Gets or sets the text command to run against the data source.

CommandTimeout

Gets or sets the wait time before terminating the attempt to execute a command and generating an error.

CommandType

Indicates or specifies how the CommandText property is interpreted.

DbConnection

Gets or sets the System.Data.Common.DbConnection used by this DbCommand.

DbParameterCollection

Gets the collection of DbParameter objects.

DbTransaction

Gets or sets the DbTransaction within which this System.Data.Common.DbCommand object executes.

DesignTimeVisible

Gets or sets a value indicating whether the command object should be visible in a customized interface control.

Parameters

The Parameters list of this command.

ParentConnection

The connection used by this DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter>.

UnderlyingCommand

The underlying command used by this DbCommandWrap<TInnerConnection, TInnerCommand, TInnerParameter>.

UpdatedRowSource

Gets or sets how command results are applied to the DataRow when used by the Update method of a DbDataAdapter.

Methods

Name Description
Cancel()

Attempts to cancel the execution of this command.

ConvertDbDataReader(DbDataReader)

Convert a DbDataReader.

CreateDbParameter()

Creates and returns a new instance of the DbParameter class.

CreateInnerCommand(TInnerConnection)

Create a inner command related to an inner connection.

Dispose(bool)

Disposes the resources of this command.

ExecuteDbDataReader(CommandBehavior)

Executes the command text against the connection.

ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken)

An asynchronous version of method ExecuteDbDataReader that executes the command text against the connection.

ExecuteNonQuery()

Executes an SQL statement against a connection object.

ExecuteNonQueryAsync(CancellationToken)

An asynchronous version of ExecuteNonQuery(), which executes a SQL statement against a connection object. Invokes ExecuteNonQueryAsync(CancellationToken) with None.

ExecuteScalar()

Executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored.

ExecuteScalarAsync(CancellationToken)

An asynchronous version of ExecuteScalar(), which executes the query and returns the first column of the first row in the result set returned by the query. All other columns and rows are ignored. Invokes ExecuteScalarAsync(CancellationToken) with None.

Prepare()

Creates a prepared (or compiled) version of the command on the data source.