Пример #1
0
 public static Parameter Below(ContentItem ancestor)
 {
     return(Parameter.Like("AncestralTrail", ancestor.GetTrail() + "%"));
 }
Пример #2
0
 public static ParameterCollection BelowOrSelf(ContentItem ancestorOrSelf)
 {
     return(Parameter.Equal("ID", ancestorOrSelf.ID)
            | Parameter.Like("AncestralTrail", ancestorOrSelf.GetTrail() + "%"));
 }
Пример #3
0
 public static int CountDescendants(this IRepository <ContentItem> repository, ContentItem ancestor)
 {
     return((int)repository.Count(Parameter.Like("AncestralTrail", ancestor.GetTrail() + "%")));
 }