IsInheritedFrom() public method

Determines if the specified table is an ancestor of the this table object
public IsInheritedFrom ( Entity entity ) : bool
entity Entity
return bool
Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
        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);
        }