Hi,
I want to filter the database by the id:
public async Task<IActionResult> Index(int? id)
{
var viewModel = new ShopIndexData()
{
Categories = await _context.Category
.Include(c => c.ShopAssignments)
.Include(s => s.ShopSortAssignment)
.AsNoTracking()
.ToListAsync()
};
return View(viewModel);
}
How do I do that?
Poul Erik