Writing a Transactional Application
As a transactional application programmer, you can take advantage of the two programming models provided by the System.Transactions namespace to create a transaction. You can utilize the explicit programming model by using the Transaction class, or the implicit programming model in which transactions are automatically managed by the infrastructure, by using the TransactionScope class. We recommend that you use the implicit transaction model for development. You can find more information on how to use a transaction scope in the Implementing an Implicit Transaction using Transaction Scope topic.
Both models support committing a transaction when the program reaches a consistent state. If the commit succeeds, the transaction is durably committed. If the commit fails, the transaction aborts. If the application program cannot successfully complete the transaction, it attempts to abort and undo the transaction's effects.
In This Section
Creating a Transaction
The System.Transactions namespace provides two models for creating a transaction. These models are covered in the following topics.
Escalating Transaction Management
When a transaction needs to access a resource in another application domain, or if you want to enlist in another durable resource manager, the transaction is automatically escalated to be managed by the MSDTC. Transaction escalation is covered in the Transaction Management Escalation topic.
The topic Interoperability with Enterprise Services and COM+ Transactions illustrates how you can make your distributed transactions interact with COM+ transactions.
Working within ASP.NET
Submit and view feedback for