CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Data.SqlClient.ConnectionManager Class Reference

Provides an automated way to reuse open database connections within the context of a single data portal operation. More...

Inheritance diagram for Csla.Data.SqlClient.ConnectionManager:

Public Member Functions

void Dispose ()
 Dispose object, dereferencing or disposing the connection it is managing. More...
 

Static Public Member Functions

static ConnectionManager GetManager (string database)
 Gets the ConnectionManager object for the specified database. More...
 
static ConnectionManager GetManager (string database, string label)
 Gets the ConnectionManager object for the specified database. More...
 
static ConnectionManager GetManager (string database, bool isDatabaseName)
 Gets the ConnectionManager object for the specified database. More...
 
static ConnectionManager GetManager (string database, bool isDatabaseName, string label)
 Gets the ConnectionManager object for the specified database. More...
 

Protected Member Functions

virtual void Dispose (bool p)
 Dispose object, dereferencing or disposing the context 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...
 

Detailed Description

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."

Definition at line 35 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

Member Function Documentation

◆ Dispose() [1/2]

void Csla.Data.SqlClient.ConnectionManager.Dispose ( )

Dispose object, dereferencing or disposing the connection it is managing.

Definition at line 187 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ Dispose() [2/2]

virtual void Csla.Data.SqlClient.ConnectionManager.Dispose ( bool  p)
protectedvirtual

Dispose object, dereferencing or disposing the context it is managing.

Definition at line 198 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ GetManager() [1/4]

static ConnectionManager Csla.Data.SqlClient.ConnectionManager.GetManager ( string  database)
static

Gets the ConnectionManager object for the specified database.

Parameters
databaseDatabase name as shown in the config file.

Definition at line 48 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ GetManager() [2/4]

static ConnectionManager Csla.Data.SqlClient.ConnectionManager.GetManager ( string  database,
bool  isDatabaseName 
)
static

Gets the ConnectionManager object for the specified database.

Parameters
databaseThe database name or connection string.
isDatabaseNameTrue 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.
Returns
ConnectionManager object for the name.

Definition at line 80 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ GetManager() [3/4]

static ConnectionManager Csla.Data.SqlClient.ConnectionManager.GetManager ( string  database,
bool  isDatabaseName,
string  label 
)
static

Gets the ConnectionManager object for the specified database.

Parameters
databaseThe database name or connection string.
isDatabaseNameTrue 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.
labelLabel for this connection.
Returns
ConnectionManager object for the name.

Definition at line 100 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ GetManager() [4/4]

static ConnectionManager Csla.Data.SqlClient.ConnectionManager.GetManager ( string  database,
string  label 
)
static

Gets the ConnectionManager object for the specified database.

Parameters
databaseDatabase name as shown in the config file.
labelLabel for this connection.

Definition at line 61 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

Property Documentation

◆ Connection

IDbConnection Csla.Data.SqlClient.ConnectionManager.Connection
get

Dispose object, dereferencing or disposing the connection it is managing.

Definition at line 157 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.

◆ RefCount

int Csla.Data.SqlClient.ConnectionManager.RefCount
get

Gets the current reference count for this object.

Definition at line 163 of file Csla.Data.SqlClient.Fx/ConnectionManager.cs.