Exemplo n.º 1
0
        private void InitializeProgram()
        {
            MySqlClient client = MySqlClient.From("username", "password", "database", "server");

            this._mySqlHandler = new MySqlHandler(client);

            InitializeDatagrid();
        }
Exemplo n.º 2
0
        public MySqlHandler(MySqlClient client, string sslMode = "None")
        {
            string connectionString = $"Server={client.Server};" +
                                      $"Port={client.Port};" +
                                      $"SslMode={sslMode};" +
                                      $"Database={client.Database};" +
                                      $"Uid={client.UserName};" +
                                      $"Pwd={client.Password};";

            this._connection = new MySqlConnection(connectionString);
        }