AddBreadcrumbs Method
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Mvc
- Assemblies
- Cuemon.Extensions.AspNetCore.Mvc.dll
AddBreadcrumbs<T>(ViewDataDictionary, Controller, T, Func<T, IEnumerable<string>>)
Adds a sequence of Breadcrumb objects to the specified viewData.
public static void AddBreadcrumbs<T>(this ViewDataDictionary viewData, Controller controller, T model, Func<T, IEnumerable<string>> initializer)
Parameters
viewDataViewDataDictionaryThe ViewDataDictionary to extend.
controllerControllerThe controller to resolve all public methods with IActionResult as return type from.
modelTThe model to retrieve custom breadcrumb labels from.
initializerFunc<T, IEnumerable<string>>The function delegate that will initialize labels from the spcified
model.
Type Parameters
TThe type of the model to retrieve breadcrumb labels from.