how to list all databases names sql server in asp.net mvc 5 : i'm trying this code in controller  but doesn't work  ... 
 Server myserver = new Server(".");


            DataTable servers = SqlDataSourceEnumerator.Instance.GetDataSources();

            DatabaseCollection mydata = myserver.Databases;
            foreach (Database db in myserver.Databases)
            {

            }