Export (0) Print
Expand All

Transaction Class

Represents a transaction.

Namespace: System.Transactions
Assembly: System.Transactions (in system.transactions.dll)

[SerializableAttribute] 
public class Transaction : IDisposable, ISerializable
/** @attribute SerializableAttribute() */ 
public class Transaction implements IDisposable, ISerializable
SerializableAttribute 
public class Transaction implements IDisposable, ISerializable
Not applicable.

The System.Transactions namespace provides both an explicit programming model based on the Transaction class, as well as an implicit programming model using the TransactionScope class, in which transactions are automatically managed by the infrastructure. It is highly recommended that you use the easier implicit model for development. To get started, please see the Implement Implicit Transactions using Transaction Scope topic. For more information on writing a transactional application, see Writing A Transactional Application.

The Transaction class contains methods used by developers implementing resource managers for enlistment. It also provides functionalities for cloning a transaction and controlling the current transaction context. You can obtain the current transaction, if one is set, using the static Current property.

This type is thread safe.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft