private void btnGetTable_Click(object sender, EventArgs e) { DatabaseConnection databaseConnection = new DatabaseConnection(); List<TableDatabase> tableList; databaseConnection.Server = "LAB-PC\\SQL2012"; databaseConnection.Database = "WSP"; databaseConnection.User = "******"; databaseConnection.Password = "******"; _facadeDatabase = new Facade(DatabaseType.SQLServer, databaseConnection); tableList = _facadeDatabase.GetTables(); foreach (TableDatabase table in tableList) { lstTable.Items.Add(table.Name); } }
public Facade(DatabaseType databaseType, DatabaseConnection databaseConnection) { Database = new CreateDabase(databaseType, databaseConnection).GetDatabase(); }