Retrieves the breadth-first descendant of a given view model type with an optional filter.

public static async ValueTask<INodeViewModel<TModel>> FirstDescendantAsync<TModel>(IRedaktContext context, string nodeId, Func<TModel, bool> filter, Nullable<CultureInfo> forCulture)
Returns:
ValueTask<INodeViewModel<TModel>>

Parameters

nodeId string

The node id to get the descendant for.

filter Func<TModel, bool>

An optional filter predicate.

forCulture Nullable<CultureInfo>

Type Parameters

TModel

The view model type of the descendant.

In this article