public IEnumerable <Relation> GetRelationsWhereChild(Table table, bool fullHierarchy) { var retval = new List <Relation>(); foreach (Relation relation in this.Relations) { var childTable = relation.ChildTableRef.Object as Table; if (childTable == table) { retval.Add(relation); } else if (fullHierarchy && table.IsInheritedFrom(childTable)) { retval.Add(relation); } } return(retval); }
public IEnumerable<Relation> GetRelationsWhereChild(Table table, bool fullHierarchy) { var retval = new List<Relation>(); foreach (Relation relation in this.Relations) { var childTable = relation.ChildTableRef.Object as Table; if (childTable == table) retval.Add(relation); else if (fullHierarchy && table.IsInheritedFrom(childTable)) retval.Add(relation); } return retval; }