Provides an automated way to reuse Entity Framework DbContext 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 DbContextManager< C > | GetManager () |
Gets the DbContextManager object for the /// specified database. More... | |
static DbContextManager< C > | GetManager (string database) |
Gets the DbContextManager object for the specified database. More... | |
static DbContextManager< C > | GetManager (string database, string label) |
Gets the DbContextManager 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 | |
C | DbContext [get] |
Gets the DbContext object. More... | |
int | RefCount [get] |
Gets the current reference count for this object. More... | |
Provides an automated way to reuse Entity Framework DbContext objects within the context of a single data portal operation.
C | Type of database DbContext 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 | : | DbContext |
Definition at line 33 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
void Csla.Data.EntityFrameworkCore.DbContextManager< C >.Dispose | ( | ) |
Dispose object, dereferencing or disposing the context it is managing.
Definition at line 152 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
protectedvirtual |
Dispose object, dereferencing or disposing the context it is managing.
Definition at line 163 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
static |
Gets the DbContextManager object for the /// specified database.
Definition at line 44 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
static |
Gets the DbContextManager object for the specified database.
database | Database name as shown in the config file. |
Definition at line 54 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
static |
Gets the DbContextManager object for the specified database.
database | The database name or connection string. |
label | Label for this context. |
Definition at line 68 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
get |
Gets the DbContext object.
Definition at line 113 of file Csla.Data.EFCore.Shared/DbContextManager.cs.
|
get |
Gets the current reference count for this object.
Definition at line 124 of file Csla.Data.EFCore.Shared/DbContextManager.cs.