static void Main() { SchemaExtractorWrapper s = new SchemaExtractorWrapper(); s.ProviderType = "System.Data.SqlClient"; s.ConnectionString = "Data Source=.\\sqlexpress;Initial Catalog=DecorStores;Integrated Security=True"; XmlDocument xDoc = s.GetSchemaDefinition(); }
private void m_GuiRefreshToolStripMenuItem_Click(object sender, EventArgs e) { if (m_Project != null && m_IsProjectLoaded) { m_SchemaExtractor = new SchemaExtractorWrapper(); m_SchemaExtractor.ProviderType = m_Project.Configuration.DbConnectionDetails.DbProviderType; m_SchemaExtractor.ConnectionString = m_Project.Configuration.DbConnectionDetails.ConnectionString; XmlDocument xDoc = m_SchemaExtractor.GetSchemaDefinition(); m_Project.LoadSchemasFromXml(xDoc.SelectSingleNode("schemas")); } LoadTree(m_Project); }
void m_ConfigurationViewControl_ConfigurationChanged(object sender, Controls.ConfigurationView.ChangedEventArgs e) { m_Project.Configuration.DbConnectionDetails.DbProviderType = e.DbProvider; m_Project.Configuration.DbConnectionDetails.ConnectionString = e.ConnectionString; m_Project.Configuration.CodeGenerationDetails.Namespace = e.Namespace; m_Project.Configuration.CodeGenerationDetails.OutputPath = e.OutputPath; if (m_ConfigurationViewControl.Parent is Form) { //((Form)m_ConfigurationViewControl.Parent).Controls.Remove(m_ConfigurationViewControl); //((Form)m_ConfigurationViewControl.Parent).Dispose(); } if (m_Project != null && m_IsProjectLoaded) { m_SchemaExtractor = new SchemaExtractorWrapper(); m_SchemaExtractor.ProviderType = m_Project.Configuration.DbConnectionDetails.DbProviderType; m_SchemaExtractor.ConnectionString = m_Project.Configuration.DbConnectionDetails.ConnectionString; XmlDocument xDoc = m_SchemaExtractor.GetSchemaDefinition(); m_Project.LoadSchemasFromXml(xDoc.SelectSingleNode("schemas")); } LoadTree(m_Project); UpdateApplicationFeaturesBasedOnRecentProjectChanges(); }