public static TableSchemaCollection GetParents(this TableSchema table)
        {
            var list = new List<TableSchema>();

            foreach (var column in table.Columns.Where(x => x.IsForeignKeyMember && !x.GetPrimaryTable().Equals(table)))
            {
                if (!list.Contains(column.GetPrimaryTable()))
                {
                    list.Add(column.GetPrimaryTable());
                }
            }
            return list.ToTableSchemaCollection();
        }
        public static TableSchemaCollection GetChildren(this TableSchema table)
        {
            var list = new List<TableSchema>();

            foreach (var possibleChild in table.Database.Tables.Where(x => !x.Equals(table)))
            {
                foreach (var column in possibleChild.Columns)
                {
                    if (column.IsForeignKeyMember && column.GetPrimaryTable().Equals(table) && !list.Contains(possibleChild)) { list.Add(possibleChild); }
                }
            }

            return list.ToTableSchemaCollection();
        }