@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); }
Item
@foreach (var item in items.DistinctBy(item => item.Brand)) { @foreach (var item in items.OrderBy(item => item.Name)) {
@*@CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol*@