public IEnumerable <Database> GetAllDBs()
        {
            var allDbs = new List <Database>();

            allDbs.AddRange(sqlDbService.GetAllDatabases());
            allDbs.AddRange(mySqlDbService.GetAllDatabases());
            return(allDbs);
        }
Beispiel #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();
        }