public static Parameter Below(ContentItem ancestor) { return(Parameter.Like("AncestralTrail", ancestor.GetTrail() + "%")); }
public static ParameterCollection BelowOrSelf(ContentItem ancestorOrSelf) { return(Parameter.Equal("ID", ancestorOrSelf.ID) | Parameter.Like("AncestralTrail", ancestorOrSelf.GetTrail() + "%")); }
public static int CountDescendants(this IRepository <ContentItem> repository, ContentItem ancestor) { return((int)repository.Count(Parameter.Like("AncestralTrail", ancestor.GetTrail() + "%"))); }