Beispiel #1
0
        public static IEnumerable<RelationObject> GetReferenceTables(this Table t)
        {
            Collection<RelationObject> relations = new Collection<RelationObject>();

            foreach (ForeignKey fkey in t.ForeignKeys)
            {
                RelationObject rho = new RelationObject();
                rho.TableName = fkey.ReferencedTable;
                rho.ColumnName = fkey.ReferencedKey;
                relations.Add(rho);
            }

            return relations;
        }