Appearance
DatabaseConfig Class
Definition
Instance of a Configuration for connecting to a database
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Constructors
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
ConnectParameters | Additional connection parameters to append to generated connection string |
Credentials | Provides authentication credentials for the database connection |
DatabaseName | The Name of the connected database |
DatabaseType | Specifies the type of database being connected to |
Logging | Logging configuration for a database connection |
Port | Network port for the server |
ProviderOptions | Provider-specific connection policy (for example PostgreSqlConnectionOptions). |
Server | Hostname for the database server |
Methods
| Name | Description |
|---|---|
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 |