private async void LoadSourceDbSchemaInfo() { this.tvSource.Nodes.Clear(); DatabaseType dbType = this.GetDatabaseType(this.cboSourceDB.Text); DbInterpreterOption option = new DbInterpreterOption() { ObjectFetchMode = DatabaseObjectFetchMode.Simple }; DbInterpreter dbInterpreter = DbInterpreterHelper.GetDbInterpreter(dbType, this.sourceDbConnectionInfo, option); if (dbInterpreter is SqlServerInterpreter) { List <UserDefinedType> userDefinedTypes = await dbInterpreter.GetUserDefinedTypesAsync(); if (userDefinedTypes.Count > 0) { TreeNode userDefinedRootNode = new TreeNode("User Defined Types"); userDefinedRootNode.Name = nameof(UserDefinedType); this.tvSource.Nodes.Add(userDefinedRootNode); foreach (UserDefinedType userDefinedType in userDefinedTypes) { TreeNode node = new TreeNode(); node.Tag = userDefinedType; node.Text = $"{userDefinedType.Owner}.{userDefinedType.Name}"; userDefinedRootNode.Nodes.Add(node); } } } TreeNode tableRootNode = new TreeNode("Tables"); tableRootNode.Name = nameof(Table); this.tvSource.Nodes.Add(tableRootNode); List <Table> tables = await dbInterpreter.GetTablesAsync(); foreach (Table table in tables) { TreeNode tableNode = new TreeNode(); tableNode.Tag = table; tableNode.Text = dbInterpreter.GetObjectDisplayName(table, false); tableRootNode.Nodes.Add(tableNode); } TreeNode viewRootNode = new TreeNode("Views"); viewRootNode.Name = nameof(DatabaseInterpreter.Model.View); this.tvSource.Nodes.Add(viewRootNode); List <DatabaseInterpreter.Model.View> views = ViewHelper.ResortViews(await dbInterpreter.GetViewsAsync()); foreach (var view in views) { TreeNode viewNode = new TreeNode(); viewNode.Tag = view; viewNode.Text = dbInterpreter.GetObjectDisplayName(view, false); viewRootNode.Nodes.Add(viewNode); } }