Appearance
Add Method
Definition
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Overloads
| Name | Description |
|---|---|
DbSessionFactoryOptionsBuilder Add(string name, DatabaseConfig configuration, ISqlGeneratorOptions sqlGeneratorOptions = null, bool isDefault = null, bool openOnConnect = null) | Adds a named database registration that creates sessions from a structured DatabaseConfig instance. |
DbSessionFactoryOptionsBuilder Add(string name, DatabaseType dbType, string connectionString, ISqlGeneratorOptions sqlGeneratorOptions = null, LogConfig logConfig = null, bool isDefault = null, bool openOnConnect = null) | Adds a named database registration that creates sessions from a provider type and raw connection string. |
DbSessionFactoryOptionsBuilder Add(string name, DatabaseConfig configuration, ISqlGeneratorOptions sqlGeneratorOptions = null, bool isDefault = null, bool openOnConnect = null)
csharp
DbSessionFactoryOptionsBuilder Add(string name, DatabaseConfig configuration, ISqlGeneratorOptions sqlGeneratorOptions = null, bool isDefault = null, bool openOnConnect = null)Adds a named database registration that creates sessions from a structured DatabaseConfig instance.
Parameters
| Name | Description |
|---|---|
configuration | The database configuration used to create sessions for this registration. |
isDefault | to set this registration as the default. |
name | The logical name used to identify the registration. |
openOnConnect | to open the underlying database connection when the session is created; otherwise, connection opening is deferred. |
sqlGeneratorOptions | Optional SQL generator options to apply when creating sessions. |
Returns
The current DbSessionFactoryOptionsBuilder instance so that additional registrations or configuration may be chained.
DbSessionFactoryOptionsBuilder Add(string name, DatabaseType dbType, string connectionString, ISqlGeneratorOptions sqlGeneratorOptions = null, LogConfig logConfig = null, bool isDefault = null, bool openOnConnect = null)
csharp
DbSessionFactoryOptionsBuilder Add(string name, DatabaseType dbType, string connectionString, ISqlGeneratorOptions sqlGeneratorOptions = null, LogConfig logConfig = null, bool isDefault = null, bool openOnConnect = null)Adds a named database registration that creates sessions from a provider type and raw connection string.
Parameters
| Name | Description |
|---|---|
connectionString | The raw provider-specific connection string used to create sessions. |
dbType | The database provider type used to create sessions. |
isDefault | to set this registration as the default. |
logConfig | Optional logging configuration to apply when creating sessions. |
name | The logical name used to identify the registration. |
openOnConnect | to open the underlying database connection when the session is created; otherwise, connection opening is deferred. |
sqlGeneratorOptions | Optional SQL generator options to apply when creating sessions. |
Returns
The current DbSessionFactoryOptionsBuilder instance so that additional registrations or configuration may be chained.