Appearance
DbSessionFactory Class
Definition
Creates IDatabaseSession instances from named DbSessionRegistration entries stored in DbSessionFactoryOptions.
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Methods
| Name | Description |
|---|---|
IDatabaseSession Create() | Creates a new database session using the default registration name defined in the factory options. |
IDatabaseSession Create(string name) | Creates a new database session using the named registration. |
Task<IDatabaseSession> CreateAsync() | Asynchronously creates a new database session using the default registration name defined in the factory options. |
Task<IDatabaseSession> CreateAsync(string name) | Asynchronously creates a new database session using the named registration. |
Remarks
This factory is intended to be registered as a singleton service. It does not cache or track live session instances. Each call to Create, Create, CreateAsync, or CreateAsync creates a new session.