Connection. Enlist Transaction(Transaction) Method
Enlists in the specified transaction as a distributed transaction.
public: override void EnlistTransaction(System::Transactions::Transaction ^ transaction);
public override void EnlistTransaction (System.Transactions.Transaction transaction);
override this.EnlistTransaction : System.Transactions.Transaction -> unit
You can use 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, making it preferable to EnlistDistributedTransaction, which uses a System.EnterpriseServices.ITransaction object. It also has slightly different semantics: once a connection is explicitly enlisted on a transaction, it cannot be unenlisted or enlisted in another transaction until the first transaction finishes. For more information about distributed transactions, see Distributed Transactions.