Пример #1
0
        public static ContentViewModel WithChildren(this ContentViewModel i)
        {
            var children = ContentApi.SelectByParent(i.Id);

            i.ChildrenCount = ContentApi.GetChildrenCount(i.Id);
            i.Children      = children.Select(c => ContentViewModel.New(c).WithUser().WithTags()).ToList();
            return(i);
        }
Пример #2
0
 public static ContentViewModel WithChildrenCount(this ContentViewModel i)
 {
     i.ChildrenCount = ContentApi.GetChildrenCount(i.Id);
     return(i);
 }