So I'm trying to make a Blazor application that displays a customers data. When all the customers are displayed I would like to be able to navigate to an individual customer. I am having trouble making this work. The main concept is in the code below as well I have the expected model.
@for(int i = 0; i < customers.Length-1; i++)
{
<tr>
<td>@customer.Id</td>
<td>@customer.CustomerId</td>
<td>@customer.LastName</td>
<td>@customer.FirstName</td>
<td>@customer.Name1056Form</td>
<td>@customer.TrapezeClientId</td>
<td>@customer.CustomerNote</td>
<td @onclick="NavToCustomer(i)"> Details</td>
</tr>
private void NavToCustomer(int i)
{
int Id = i;
navigation.NavigateTo("/Customer/" + Id);
}
}