Nucleus .Net Core CMS

Models.Configuration.DatabaseOptions Class

Namespace: Nucleus.Abstractions.Models.Configuration
Assembly: Nucleus.Abstractions.dll
Represents database configuration options.

Properties

Connections Property

List of configured database connections.

Schemas Property

List of configured schemas.

Fields

Section Field

Configuration file section path for database connections.

Methods

GetDatabaseConnection (String) Method

GetDatabaseConnection (String schemaName)
Get the database connection options for the schema specifed by schemaName. If no matching connection is found, return the database connection options for the "*" (default) schema.
Parameters
Name Type
schemaName String

GetConfiguredSchema (String,Boolean) Method

GetConfiguredSchema (String schemaName, Boolean canUseDefault)
Find a configuration "schema" section matching the specified schema name.
Parameters
Name Type
schemaName String
canUseDefault Boolean

IsDatabaseConfigured

IsDatabaseConfigured ()
Returns whether config has a default database schema configured.
Remarks
When Nucleus is first installed, it can have no default database schema configured, which means that it should display the setup wizard. This function is used to prevent exceptions during startup when the Nucleus database has not been configured,

GetDatabaseConnection (String,Boolean) Method

GetDatabaseConnection (String schemaName, Boolean canUseDefault)
Get the database connection options for the schema specifed by schemaName. If no matching connection is found, return the database connection options for the "*" (default) schema.
Parameters
Name Type
schemaName String
canUseDefault Boolean