src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/WizardPageUpdateFromDatabase.cs
// <summary>
//     DoWork event handler: Get database objects in a background thread.
//     This method is called by background worker component on a diffferent thread than the UI thread.
//     We use the ModelBuilderEngine to get database objects to display
// </summary>
DoWork event handler: Get database objects in a background thread.
This method is called by background worker component on a diffferent thread than the UI thread.
We use the ModelBuilderEngine to get database objects to display
DoWork event handler : Get database objects in a background thread . This method is called by background worker component on a diffferent thread than the UI thread . We use the ModelBuilderEngine to get database objects to display
private void bgWorkerPopulateTree_DoWork(object sender, DoWorkEventArgs args)
        {
            var result = new ICollection<EntityStoreSchemaFilterEntry>[3];
            try
            {
                result[0] = DatabaseMetadataQueryTool.GetTablesFilterEntries(Wizard.ModelBuilderSettings, args);
                if (args.Cancel)
                {
                    return;
                }
                result[1] = DatabaseMetadataQueryTool.GetViewFilterEntries(Wizard.ModelBuilderSettings, args);
                if (args.Cancel)
                {
                    return;
                }
                result[2] = DatabaseMetadataQueryTool.GetFunctionsFilterEntries(Wizard.ModelBuilderSettings, args);
                if (args.Cancel)
                {
                    return;
                }
            }
            finally
            {
                VsUtils.SafeCloseDbConnectionOnFile(
                    Wizard.ModelBuilderSettings.DesignTimeProviderInvariantName, Wizard.ModelBuilderSettings.DesignTimeConnectionString);
            }
            args.Result = result;
        }
private void bgWorkerPopulateTree_DoWork ( object sender , DoWorkEventArgs args ) { var result = new ICollection < EntityStoreSchemaFilterEntry > [ 3 ] ; try { result [ 0 ] = DatabaseMetadataQueryTool . GetTablesFilterEntries ( Wizard . ModelBuilderSettings , args ) ; if ( args . Cancel ) { return ; } result [ 1 ] = DatabaseMetadataQueryTool . GetViewFilterEntries ( Wizard . ModelBuilderSettings , args ) ; if ( args . Cancel ) { return ; } result [ 2 ] = DatabaseMetadataQueryTool . GetFunctionsFilterEntries ( Wizard . ModelBuilderSettings , args ) ; if ( args . Cancel ) { return ; } } finally { VsUtils . SafeCloseDbConnectionOnFile ( Wizard . ModelBuilderSettings . DesignTimeProviderInvariantName , Wizard . ModelBuilderSettings . DesignTimeConnectionString ) ; } args . Result = result ; }
DoWork event handler: Get database objects in a background thread.
DoWork event handler : Get database objects in a background thread .
// This method will run on a thread other than the UI thread. // Be sure not to manipulate any Windows Forms controls created on the UI thread from this method.
sender
object
args
DoWorkEventArgs