Provides an automated way to reuse open database connections within the context of a single data portal operation. More...
Public Member Functions | |
ConnectionManager | GetManager (string database) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager | GetManager (string database, string label) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager | GetManager (string database, bool isDatabaseName) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager | GetManager (string database, bool isDatabaseName, string label) |
Gets the ConnectionManager object for the specified database. More... | |
void | Dispose () |
Dispose object, dereferencing or disposing the connection it is managing. More... | |
ConnectionManager< C > | GetManager (string database) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager< C > | GetManager (string database, string label) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager< C > | GetManager (string database, bool isDatabaseName) |
Gets the ConnectionManager object for the specified database. More... | |
ConnectionManager< C > | GetManager (string database, bool isDatabaseName, string label) |
Gets the ConnectionManager object for the specified database. More... | |
void | Dispose () |
Dispose object, dereferencing or disposing the connection it is managing. More... | |
Properties | |
IDbConnection | Connection [get] |
Dispose object, dereferencing or disposing the connection it is managing. More... | |
int | RefCount [get] |
Gets the current reference count for this object. More... | |
C | Connection [get] |
Gets the open database connection object. More... | |
Properties inherited from Csla.Core.IUseApplicationContext | |
ApplicationContext | ApplicationContext [getset] |
Gets or sets the current ApplicationContext object. More... | |
Provides an automated way to reuse open database connections within the context of a single data portal operation.
This type stores the open database connection in Csla.ApplicationContext.LocalContext and uses reference counting through IDisposable to keep the connection open for reuse by child objects, and to automatically dispose the connection when the last consumer has called Dispose." </remarks> </summary> <typeparam name="C"> Type of database connection object to use. </typeparam> <remarks> This type stores the open database connection in <see cref="Csla.ApplicationContext.LocalContext" /> and uses reference counting through <see cref="IDisposable" /> to keep the connection open for reuse by child objects, and to automatically dispose the connection when the last consumer has called Dispose."
C | : | IDbConnection | |
C | : | new() |
Definition at line 33 of file ConnectionManagerT.cs.
void Csla.Data.ConnectionManager< C >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the connection it is managing.
Definition at line 213 of file ConnectionManager.cs.
void Csla.Data.ConnectionManager< C >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the connection it is managing.
Definition at line 204 of file ConnectionManagerT.cs.
ConnectionManager Csla.Data.ConnectionManager< C >.GetManager | ( | string | database | ) |
Gets the ConnectionManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 49 of file ConnectionManager.cs.
ConnectionManager< C > Csla.Data.ConnectionManager< C >.GetManager | ( | string | database | ) |
Gets the ConnectionManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 51 of file ConnectionManagerT.cs.
ConnectionManager Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
bool | isDatabaseName | ||
) |
Gets the ConnectionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the connection string should be retrieved from the config file. If False, the database parameter is directly used as a connection string. |
Definition at line 81 of file ConnectionManager.cs.
ConnectionManager< C > Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
bool | isDatabaseName | ||
) |
Gets the ConnectionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the connection string should be retrieved from the config file. If False, the database parameter is directly used as a connection string. |
Definition at line 83 of file ConnectionManagerT.cs.
ConnectionManager Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
bool | isDatabaseName, | ||
string | label | ||
) |
Gets the ConnectionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the connection string should be retrieved from the config file. If False, the database parameter is directly used as a connection string. |
label | Label for this connection. |
Definition at line 101 of file ConnectionManager.cs.
ConnectionManager< C > Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
bool | isDatabaseName, | ||
string | label | ||
) |
Gets the ConnectionManager object for the specified database.
database | The database name or connection string. |
isDatabaseName | True to indicate that the connection string should be retrieved from the config file. If False, the database parameter is directly used as a connection string. |
label | Label for this connection. |
Definition at line 103 of file ConnectionManagerT.cs.
ConnectionManager Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
string | label | ||
) |
Gets the ConnectionManager object for the specified database.
database | Database name as shown in the config file. |
label | Label for this connection. |
Definition at line 62 of file ConnectionManager.cs.
ConnectionManager< C > Csla.Data.ConnectionManager< C >.GetManager | ( | string | database, |
string | label | ||
) |
Gets the ConnectionManager object for the specified database.
database | Database name as shown in the config file. |
label | Label for this connection. |
Definition at line 64 of file ConnectionManagerT.cs.
|
get |
Dispose object, dereferencing or disposing the connection it is managing.
Definition at line 172 of file ConnectionManager.cs.
|
get |
Gets the open database connection object.
Definition at line 163 of file ConnectionManagerT.cs.
|
get |
Gets the current reference count for this object.
Definition at line 186 of file ConnectionManager.cs.