Indicates that a per-thread shared DbConnection object should be used the default DataProvider
(or alternativley a specific DataProvider if one is given) when communicating with the database.
This class is designed to be used within a using () {} block and in conjunction with a TransactionScope object.
It's purpose is to force a common DbConnection object to be used which has the effect of avoiding promotion
of a System.Transaction ambient Transaction to the DTC where possible.
When this class is created, it indicates to the underlying DataProvider that is should use a shared DbConnection
for subsequent operations. When the class is disposed (ie the using() {} block ends) it will indicate to the
underlying provider that it should no longer it's current shared connection and should Dispose() it.
Namespace:
SubSonic
Assembly:
SubSonic (in SubSonic.dll) Version: 2.1.0.0 (2.1.0)
Syntax
| Visual Basic (Declaration) |
|---|
Public Class SharedDbConnectionScope _
Implements IDisposable |
| Visual C++ |
|---|
public ref class SharedDbConnectionScope : IDisposable |
Inheritance Hierarchy
See Also