You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the SmartBreadcrumbs functionality does not recognize asynchronous actions that have an Async suffix in their names. While the actions work as expected, the breadcrumb feature fails to display them when the Async suffix is present, even if the method is declared with the async keyword.
For instance:
Not Recognized: The breadcrumb does not show the action Details:
[Breadcrumb("Details")]
public async Task<IActionResult> DetailsAsync(int id, string ln = "")
{ // codes with await keywords }
Recognized: The breadcrumb correctly displays the action Details:
[Breadcrumb("Details")]
public async Task<IActionResult> Details(int id, string ln = "")
{ // codes with await keywords }
A similar issue occurred when attempting to make the Index action (default) of a HomeController asynchronous by naming it IndexAsync(). Despite not adding any annotations, the exception was triggered, likely due to the presence of a [DefaultBreadcrumb("Home")]] annotation above the controller class. However, it's puzzling why IndexAsync() wasn't recognized as an Index action, considering the controller and view treated it as such.
The exception message received was:
SmartBreadcrumbs.SmartBreadcrumbsException: 'HomeController doesn't contain a valid action named Index.
The exception was triggered at program.cs in the following line:
It appears that the SmartBreadcrumbs functionality does not recognize asynchronous actions that have an
Async
suffix in their names. While the actions work as expected, the breadcrumb feature fails to display them when theAsync
suffix is present, even if the method is declared with theasync
keyword.For instance:
Not Recognized: The breadcrumb does not show the action
Details
:Recognized: The breadcrumb correctly displays the action
Details
:A similar issue occurred when attempting to make the
Index
action (default) of aHomeController
asynchronous by naming itIndexAsync()
. Despite not adding any annotations, the exception was triggered, likely due to the presence of a[DefaultBreadcrumb("Home")]]
annotation above the controller class. However, it's puzzling whyIndexAsync()
wasn't recognized as anIndex
action, considering the controller and view treated it as such.The exception message received was:
The exception was triggered at
program.cs
in the following line:The text was updated successfully, but these errors were encountered: