title: How to load database to TreeView in wpf with MVVM
body: <p><img src="https://i.stack.imgur.com/20C9q.png" alt="this is the functionality i want to achieve thru passing the Connection string as parameter"></p>
  
  <pre><code>     using (DataConnectionDialog dlg = new DataConnectionDialog())
        {
  
        DataSource.AddStandardDataSources(dlg);
        DataConnectionDialog.Show(dlg).ToString().Equals("OK");
        DataProvider provider = dlg.SelectedDataProvider;
       BcpConfig.DatabaseClient = provider.Name    ;
        string sqlDatabase = ConfigurationManager.AppSettings[provider.Name];
         BcpConfig..Database = DatabaseFactory.CreateDb(dlg.ConnectionString, sqlDatabase);
  </code></pre>
  
  <p>above on is my model class which creates the connection and give as connection string path like "Data Source=.;Initial Catalog=Northwind;Integrated Security=True"</p>