Enterprise Library Data Access Application Block  7.0-rc1
The Data Access Application Block abstracts the actual database you are using, and exposes a collection of methods that make it easy to access that database and to perform common tasks.
Microsoft.Practices.EnterpriseLibrary.Data.TransactionScopeConnections Class Reference

This class manages the connections that will be used when transactions are active as a result of instantiating a TransactionScope. When a transaction is active, all database access must be through this single connection unless you want to use a distributed transaction, which is an expensive operation. More...

Static Public Member Functions

static DatabaseConnectionWrapper GetConnection (Database db)
 Returns a connection for the current transaction. This will be an existing DbConnection instance or a new one if there is a TransactionScope active. Otherwise this method returns null. More...
 

Detailed Description

This class manages the connections that will be used when transactions are active as a result of instantiating a TransactionScope. When a transaction is active, all database access must be through this single connection unless you want to use a distributed transaction, which is an expensive operation.

Member Function Documentation

◆ GetConnection()

static DatabaseConnectionWrapper Microsoft.Practices.EnterpriseLibrary.Data.TransactionScopeConnections.GetConnection ( Database  db)
static

Returns a connection for the current transaction. This will be an existing DbConnection instance or a new one if there is a TransactionScope active. Otherwise this method returns null.

Parameters
dbThe database to get the connection for
Returns
Either a DbConnection instance or null.

The documentation for this class was generated from the following file: