I'm a long time hobby developer, and recently started playing around with Blazor.
The initial issue I was working with today was how to localize the route name. I found a solution for it replacing @page "/whatever"
with @attribute [Route($"{whatever}")]
, and this works if I define whatever as a constant string.
However, as soon as I get to a page where I need to pass an Id, e.g. to retreive a database record, I'm stuck, as I can't use @attribute [Route($"{whatever}/{Id}")]
without creating an object instance (error CS0120)...
The solution I found for the dynamic routenaming was here: Blazor @page route url define with variable but as a new member I can't ask the person who provided the answer directly how to use Parameters with this solution..