Skip to content

DatabaseConfig Class ​

Definition ​

Instance of a Configuration for connecting to a database

  • Namespace: JASE.Database
  • Assembly: JASE.Database.dll

Constructors ​

NameDescription
DatabaseConfig()Creates an empty instance of a DatabaseConfiguration
DatabaseConfig(DatabaseType dbType, string server, string database, ICredentialProvider credentials)Creates an instance of a DatabaseConfiguration using provided parameters
DatabaseConfig(string configuration)Creates an instance of a DatabaseConfig using JSON or XML

Properties ​

NameDescription
ConnectParametersAdditional connection parameters to append to generated connection string
CredentialsProvides authentication credentials for the database connection
DatabaseNameThe Name of the connected database
DatabaseTypeSpecifies the type of database being connected to
LoggingLogging configuration for a database connection
PortNetwork port for the server
ProviderOptionsProvider-specific connection policy (for example PostgreSqlConnectionOptions).
ServerHostname for the database server

Methods ​

NameDescription
IDatabaseConfig Copy()Create a deep copy of the IDbConfig implementation class
IDatabaseConfig FromJson(string json)Create and instance of a DatabaseConfig from a JSON string
void SetCredentials(ICredentialProvider credentials)Set the Credentials provider