Once you hvae the Database
, just inspect it's .Tables
property:
Database db = new Database(server, connectionStringBuilder.InitialCatalog);
db.Refresh();
foreach(var table in db.Tables)
{
// do something with each table here...
string tableName = table.Name;
foreach(var column in table.Columns)
{
// do something with each column for that table
string columnName = column.Name;
}
}