示例#1
0
      public ObservableCollection<DbTable> GetTables(DbConnectionInfo connectionInfo)
      {
            var extractor = new SchemaExtractor();
            var tabledict = extractor.GetTables(connectionInfo);

            var tables = from t in tabledict.Values
                         orderby t.Name
                         select t;
            return new ObservableCollection<DbTable>(tables);
        }
示例#2
0
        public void LoadSchemaObjects(ICollection<SchemaObject> objectList, DbConnectionInfo connectionInfo)
        {
            var extractor = new SchemaExtractor();
            objectList.Clear();
            var tables = extractor.GetTables(connectionInfo);
            var columns = extractor.GetTableColumns(connectionInfo);
            AddColumns(tables, columns);

            var sortedTables = from t in tables.Values
                               orderby t.Name
                               select t;
            foreach (var t in sortedTables)
                objectList.Add(t);
        }