Description
The documentation states that "In ASP.NET Core 2.2 or later, both [conventional and attribute] routing invalidate [ambient] values when linking to another action." However, this only seems to be the case for actions on another controller. I am unsure whether this is a bug or the expected behavior with unclear or incorrect documentation.
Repro: Run this sample project, click the Orders tab in the navigation bar, select an order from the list, and then observe that the URL for the Orders tab in the navigation bar as generated on the order details page is /Orders/5/Index
rather than the expected /Orders
(since the documentation says the ambient value for id
shouldn't be reused since this is a different action). Note also that the Home and Privacy navigation links on the order details page do not reuse ambient values and do not include id
in their URLs.