Method WhereHasAncestor<TTarget>(Expression<Func<TTarget, bool>>, int?)

Assembly: redb.Core.dll

Filter by ancestors: find objects that have an ancestor of specified type matching condition.
The objects of TTarget that match are looked for below the start of the query; an object
the query returns is kept when one of them lies at most maxDepth levels above it.
Supports polymorphic trees - can search for ancestors of different type.

public virtual IRedbQueryable<TProps> WhereHasAncestor<TTarget>(Expression<Func<TTarget, bool>> ancestorCondition, int? maxDepth = null) where TTarget : class