Use the database ID for showing the USB vendor details.

This commit is contained in:
2026-01-01 13:41:28 +00:00
parent 5178431874
commit ff85a79f95
2 changed files with 3 additions and 3 deletions

View File

@@ -49,9 +49,9 @@ public partial class Details
await using DbContext ctx = await DbContextFactory.CreateDbContextAsync();
_model = await ctx.UsbVendors.FirstOrDefaultAsync(m => m.VendorId == Id);
_model = await ctx.UsbVendors.FirstOrDefaultAsync(m => m.Id == Id);
_products = await ctx.UsbProducts.Where(p => p.Vendor.VendorId == Id)
_products = await ctx.UsbProducts.Where(p => p.Vendor.Id == Id)
.OrderBy(static p => p.Product)
.ThenBy(static p => p.ProductId)
.Select(static p => new UsbProductModel

View File

@@ -72,7 +72,7 @@
@item.VendorId
</td>
<td>
<a class="btn btn-primary" href="/admin/usb/vendors/@item.VendorId" target="_blank">Details</a>
<a class="btn btn-primary" href="/admin/usb/vendors/@item.Id" target="_blank">Details</a>
</td>
</tr>
}