I have created a simple blazor web assembly app with a one to many relationship Customers/orders (jobs). Everything works except posting a detail record. It posts the record, but the customer id is empty in the detail record. i can use ssms and fix the issue in the record, i can display and edit the detail record with no problem. I can see in the debugger when i add a record it saves the value to the table, but when submit form happens the id is null.
[Parameter]
public int? CustomerID { get; set; }
public override async Task SetParametersAsync(ParameterView parameters)
{
tblJob = new VersaconWebAssembly.Server.Models.VersaconII.TblJob();
hasCustomerIDValue = parameters.TryGetValue<int?>("CustomerID", out var hasCustomerIDResult);
if (hasCustomerIDValue)
{
tblJob.CustomerID = hasCustomerIDResult;
}
await base.SetParametersAsync(parameters);
}