public IEnumerable<EntityHasEntities> GetRelationsWhereChild(Entity entity, bool fullHierarchy) { var retval = new List<EntityHasEntities>(); foreach (var relation in this.AllRelations) { var childTable = relation.TargetEntity; if (childTable == entity) retval.Add(relation); else if (fullHierarchy && entity.IsInheritedFrom(childTable)) retval.Add(relation); } return retval; }
public IEnumerable <EntityHasEntities> GetRelationsWhereChild(Entity entity, bool fullHierarchy) { var retval = new List <EntityHasEntities>(); foreach (var relation in this.AllRelations) { var childTable = relation.TargetEntity; if (childTable == entity) { retval.Add(relation); } else if (fullHierarchy && entity.IsInheritedFrom(childTable)) { retval.Add(relation); } } return(retval); }