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 DbConnection Summer.Batch.Common.Transaction.ConnectionUtil.GetConnection ( DbProviderFactory  providerFactory,
string  connectionString 
)
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
providerFactorythe provider factory to use when creating a new connection
connectionStringthe connection string of the connection to get
Returns
a DbConnection for the given connection string
static void Summer.Batch.Common.Transaction.ConnectionUtil.ReleaseConnections ( )
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