Breyta

Deila með


DbConnection.EnlistTransaction(Transaction) Method

Definition

Enlists in the specified transaction.

public:
 virtual void EnlistTransaction(System::Transactions::Transaction ^ transaction);
public virtual void EnlistTransaction (System.Transactions.Transaction? transaction);
public virtual void EnlistTransaction (System.Transactions.Transaction transaction);
abstract member EnlistTransaction : System.Transactions.Transaction -> unit
override this.EnlistTransaction : System.Transactions.Transaction -> unit
Public Overridable Sub EnlistTransaction (transaction As Transaction)

Parameters

transaction
Transaction

A reference to an existing Transaction in which to enlist.

Remarks

New in ADO.NET 2.0 is support for using the EnlistTransaction method to enlist in a distributed transaction. Because it enlists a connection in a Transaction instance, EnlistTransaction takes advantage of functionality available in the System.Transactions namespace for managing distributed transactions. Once a connection is explicitly enlisted in a transaction, it cannot be unenlisted or enlisted in another transaction until the first transaction finishes.

Applies to

See also