Table of Contents

AddBreadcrumbs Method

Definition

Namespace
Cuemon.Extensions.AspNetCore.Mvc
Assemblies
Cuemon.Extensions.AspNetCore.Mvc.dll
Source
src/Cuemon.Extensions.AspNetCore.Mvc/ViewDataDictionaryExtensions.cs

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

viewData ViewDataDictionary

The ViewDataDictionary to extend.

controller Controller

The controller to resolve all public methods with IActionResult as return type from.

model T

The model to retrieve custom breadcrumb labels from.

initializer Func<T, IEnumerable<string>>

The function delegate that will initialize labels from the spcified model.

Type Parameters

T

The type of the model to retrieve breadcrumb labels from.