IDbCommand.Transaction Property

Syntax:

IDbTransaction IDbCommand.Transaction { get; set; }

Description:

Type: System.Data.IDbTransaction

Gets or sets the transaction within which the command object executes. Attempting to set the transaction throws an exception. The proper way to add a command to a transaction is to create the transaction at the connection level which will automatically put all associated commands into the transaction.

This property is an explicit interface member implementation and can only be used when the RdmCommand instance is cast to an IDbCommand interface.

Exceptions:

Exception Condition
ArgumentNullException The specified transaction is null.
ArgumentException The specified transaction is not a valid RdmTransaction.
InvalidOperationException Attempted to set the transaction

Reference:

For more information, reference MSDN documentation for: System.Data.IDbCommand.Transaction