Method | Description | |
---|---|---|
Get ( |
This returns a connection from the cache, or creates a new one if necessary. This method is thread safe. This method improved one test's performance (the only one I measured) by about 20%. Since some databases cannot have more than one connection at a time, we ask the connection descriptor whether we can actually cache the connection or not.
|
|
Return ( |
Inserts the connection into the cache IF we don't have one already (we only cache one connection per unique descriptor). This method is thread safe. Due to MS Access not allowing more than one connection to have the DB locked for modifying at one time, any connections to Access DBs are closed and not cached.
|
public Get ( |
||
connDesc | ||
return | IDbConnection |
public Return ( |
||
connDesc | ||
conn | IDbConnection | |
return | void |