@using Groceries.Data @using Microsoft.EntityFrameworkCore @model TransactionItem? @inject AppDbContext dbContext @{ var items = await dbContext.Items .OrderBy(item => item.Brand) .ToListAsync(); var selectedItem = items.SingleOrDefault(item => item.Id == Model?.ItemId); }