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.Database.OldConnectionWrapper Class Reference

This is a helper class that is used to manage the lifetime of a connection for various Execute methods. We needed this class to support implicit transactions created with the TransactionScope class. In this case, the various Execute methods need to use a shared connection instead of a new connection for each request in order to prevent a distributed transaction. More...

Inheritance diagram for Microsoft.Practices.EnterpriseLibrary.Data.Database.OldConnectionWrapper:

Public Member Functions

 OldConnectionWrapper (DbConnection connection, bool disposeConnection)
 Create a new "lifetime" container for a DbConnection instance. More...
 
void Dispose ()
 Dispose the wrapped connection, if appropriate. More...
 

Properties

DbConnection Connection [get]
 Gets the actual connection. More...
 

Detailed Description

This is a helper class that is used to manage the lifetime of a connection for various Execute methods. We needed this class to support implicit transactions created with the TransactionScope class. In this case, the various Execute methods need to use a shared connection instead of a new connection for each request in order to prevent a distributed transaction.

Constructor & Destructor Documentation

◆ OldConnectionWrapper()

Microsoft.Practices.EnterpriseLibrary.Data.Database.OldConnectionWrapper.OldConnectionWrapper ( DbConnection  connection,
bool  disposeConnection 
)

Create a new "lifetime" container for a DbConnection instance.

Parameters
connectionThe connection
disposeConnectionWhether or not to dispose of the connection when this class is disposed.

Member Function Documentation

◆ Dispose()

void Microsoft.Practices.EnterpriseLibrary.Data.Database.OldConnectionWrapper.Dispose ( )

Dispose the wrapped connection, if appropriate.

Property Documentation

◆ Connection

DbConnection Microsoft.Practices.EnterpriseLibrary.Data.Database.OldConnectionWrapper.Connection
get

Gets the actual connection.


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