Provides an automated way to reuse Entity Framework object context objects within the context of a single data portal operation. More...
Public Member Functions | |
void | Dispose () |
Dispose object, dereferencing or disposing the context it is managing. More... | |
Static Public Member Functions | |
static ObjectContextManager< C > | GetManager (string database) |
Gets the ObjectContextManager object for the specified database. More... | |
static ObjectContextManager< C > | GetManager (string database, string label) |
Gets the ObjectContextManager object for the specified database. More... | |
static ObjectContextManager< C > | GetManager (string database, bool isDatabaseName) |
Gets the ObjectContextManager object for the specified database. More... | |
static ObjectContextManager< C > | GetManager (string database, bool isDatabaseName, string label) |
Gets the ObjectContextManager object for the specified database. More... | |
Properties | |
C | ObjectContext [get] |
Gets the EF object context object. More... | |
int | RefCount [get] |
Gets the current reference count for this object. More... | |
Provides an automated way to reuse Entity Framework object context objects within the context of a single data portal operation.
C | Type of database object context object to use. |
This type stores the object context object in Csla.ApplicationContext.LocalContext and uses reference counting through IDisposable to keep the data context object open for reuse by child objects, and to automatically dispose the object when the last consumer has called Dispose."
C | : | ObjectContext |
Definition at line 36 of file Csla.Data.EF6/ObjectContextManager.cs.
void Csla.Data.EF6.ObjectContextManager< C >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the context it is managing.
Definition at line 203 of file Csla.Data.EF6/ObjectContextManager.cs.
|
static |
Gets the ObjectContextManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 50 of file Csla.Data.EF6/ObjectContextManager.cs.
|
static |
Gets the ObjectContextManager 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 82 of file Csla.Data.EF6/ObjectContextManager.cs.
|
static |
Gets the ObjectContextManager 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 context. |
Definition at line 102 of file Csla.Data.EF6/ObjectContextManager.cs.
|
static |
Gets the ObjectContextManager object for the specified database.
database | Database name as shown in the config file. |
label | Label for this context. |
Definition at line 63 of file Csla.Data.EF6/ObjectContextManager.cs.
|
get |
Gets the EF object context object.
Definition at line 152 of file Csla.Data.EF6/ObjectContextManager.cs.
|
get |
Gets the current reference count for this object.
Definition at line 168 of file Csla.Data.EF6/ObjectContextManager.cs.