/// <summary> /// Creates the connector based on server config. /// </summary> /// <param name="credentials"> /// The credentials. /// </param> /// <param name="connectionType"> /// The connector type. /// </param> public void CreateConnector(DatabaseCredentials credentials, ConnectorType connectionType = ConnectorType.Postgresql) { // setup credentials this.Credentials = credentials; // create the connector switch (connectionType) { case ConnectorType.Postgresql: this.Connector = new PostgresDatabaseConnector(); break; } }
/// <summary> /// Creates the connector /// </summary> /// <param name="host">The host name</param> /// <param name="port">The port</param> /// <param name="databaseName">The database name</param> /// <param name="username">The username</param> /// <param name="password">The password</param> /// <param name="connectionType">The connector type</param> public void CreateConnector(string host, long port, string databaseName, string username, string password, ConnectorType connectionType = ConnectorType.Postgresql) { var credentials = new DatabaseCredentials { Host = host, Port = port, DatabaseName = databaseName, Username = username, Password = password }; this.CreateConnector(credentials, connectionType); }
public object CreateTransaction(DatabaseCredentials credentials) { return(null); }