예제 #1
0
 public void SearchForDBs()
 {
     if (!isRetrieved)
     {
         sqlDbService.ScanForDatabases();
         mySqlDbService.ScanForDatabases();
         isRetrieved = true;
     }
 }
예제 #2
0
        static void Main(string[] args)
        {
            SqlDatabaseController sqlTest = new SqlDatabaseController();

            sqlTest.ScanForDatabases();
            var instances = sqlTest.GetAllInstances();

            Console.WriteLine("SQL Instance Count: " + instances.Count.ToString());
            var databases = sqlTest.GetAllDatabases();

            Console.WriteLine("SQL Database Count: " + databases.Count.ToString());

            MySqlDatabaseController mySqlTest = new MySqlDatabaseController();

            mySqlTest.ScanForDatabases();
            var mySqlInstances = mySqlTest.GetAllInstances();

            Console.WriteLine("MySQL Instance Count: " + mySqlInstances.Count.ToString());
            var mySqlDatabases = mySqlTest.GetAllDatabases();

            Console.WriteLine("MySQL Database Count: " + mySqlDatabases.Count.ToString());

            Console.ReadLine();
        }