Given a Razor page/component used in Blazor Server Side with
@page "/items/create" // create route
@page "/items/edit/{id:long}" // edit route
In my code I need to know if the create route or edit route was used. How can I check this?
I am already aware of NavigationManager.Uri but that's not really error proof, e.g. NavigationManager.Uri.Contains("edit") will also evaluate to true for http://localhost:123/items/create/?edit=faked_edit (so will claim that the edit route was used, though the create route was used).