ContentRepo.GetDescendants Method

Namespace:
Weavy.Core.Repos
Assembly:
Weavy.Core.dll

GetDescendants(int, int?)

Returns the descendants of a content item. The apps are sorted like a tree.

public static IEnumerable<Content> GetDescendants(int id, int? depth)

Parameters

id
int

Id of the content item for which to get descendants.

depth
int?

The maximum depth of descendants to return, i.e. setting depth to 1 returns only the immediate children. If depth is null, the entire hierarchy is returned.

Returns

System.Collections.Generic.IEnumerable

Returns a list of Content objects.