/// <summary> /// Constructor, accepts the Parameters for the database connection /// </summary> /// <param name="user">The username for the database</param> /// <param name="pass">The password for the database</param> /// <param name="server">The database server</param> /// <param name="port">The port for the connection</param> /// <param name="database">The name of the database</param> public MySqlWrapper(string user, string pass, string server, int port, string database) { _connectionString = new MySqlConnectionString(user, pass, server, port, database); _connection = new MySqlConnection(_connectionString.ToString()); _connection.Open(); }
/// <summary> /// Constructor, establishes the Database Connection using a provided connection string /// </summary> /// <param name="connectionString">The connection string</param> public MySqlWrapper(string connectionString) { _connectionString = new MySqlConnectionString(connectionString); _connection = new MySqlConnection(_connectionString.ToString()); _connection.Open(); }