Hi,
I'm using Blazor (client side). I have a page used to edit records that I want to take the type of record and the Id. My route looks like this @page "/edit/{EntityName}/{id}"
I have my parameters like this:
` [Parameter]
public string EntityName { get; set; }
[Parameter]
public Guid Id { get; set; }`
As you can see Id is actually a GUID and this is throwing a cast error and failing to convert:
WASM: System.InvalidOperationException: Unable to set property 'id' on object of type 'TestProject.Blazor.Pages.EditForm'. The error was: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid.
Obviously I can change it to a string and convert it myself, but it would be nice to be able to have it happen automatically. I haven't tested but I guess this may also bet true of other types.
Hi, I'm using Blazor (client side). I have a page used to edit records that I want to take the type of record and the Id. My route looks like this
@page "/edit/{EntityName}/{id}"
I have my parameters like this:
` [Parameter] public string EntityName { get; set; }
As you can see Id is actually a GUID and this is throwing a cast error and failing to convert:
WASM: System.InvalidOperationException: Unable to set property 'id' on object of type 'TestProject.Blazor.Pages.EditForm'. The error was: Specified cast is not valid. ---> System.InvalidCastException: Specified cast is not valid.
Obviously I can change it to a string and convert it myself, but it would be nice to be able to have it happen automatically. I haven't tested but I guess this may also bet true of other types.
Thanks!