Closed adelemam closed 4 years ago
The reader is using Information_Schema, so they find all tables in all databases- SqlServer has better scoping. Simply specify the database you want:
var databaseReader = new DatabaseSchemaReader.DatabaseReader(connection);
databaseReader.Owner = "dbName";
allTables = databaseReader.AllTables();
wow , thanks a lot worked with me !!
I am connecting with mysql database in dotnet core project, with connection string as following server=5.189.164.15;Uid=remoteUser;database=dbName;port=3306;password=password
but it retrieve all tables in all database together ( not like MSSQL).
sample code: using (var connection = new MySqlConnection("server=5.189.164.15;Uid=remoteUser;database=dbName;port=3306;password=password")) { var databaseReader = new DatabaseSchemaReader.DatabaseReader(connection); //Then load the schema (this will take a little time on moderate to large database structures) allTables = databaseReader.AllTables(); }