Summer.Batch.Common.Transaction.ConnectionUtil Class Reference
Utility class for connections. It holds a connection for a given connection string on a thread. More...
Static Public Member Functions | |
static DbConnection | GetConnection (DbProviderFactory providerFactory, string connectionString) |
Gets a connection for the given connectionString. If one already exists for the current thread it is returned, otherwise a new one is created using the given provider factory. More... | |
static void | ReleaseConnections () |
Closes the connections and clears the connection dictionary for the current thread. More... | |
Detailed Description
Utility class for connections. It holds a connection for a given connection string on a thread.
Member Function Documentation
|
static |
Gets a connection for the given connectionString. If one already exists for the current thread it is returned, otherwise a new one is created using the given provider factory.
- Parameters
-
providerFactory the provider factory to use when creating a new connection connectionString the connection string of the connection to get
- Returns
- a DbConnection for the given connection string
|
static |
Closes the connections and clears the connection dictionary for the current thread.
The documentation for this class was generated from the following file:
- Summer.Batch.Common/Transaction/ConnectionUtil.cs