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); }
public static ContentViewModel WithChildrenCount(this ContentViewModel i) { i.ChildrenCount = ContentApi.GetChildrenCount(i.Id); return(i); }