0
Reply

Displaying grouped list in a table

Ask a question
Rich

Rich

11y
1.2k
1
This is for question is for MVC and razor view.  I am having trouble with grouping a list, and then building a model that represents that list and displaying the results in a table within a view. For example:
List of items ordered
  1. Date
  2. CustomerId
  3. Location
  4. Item
  5. Price
  6. Quantity
How would I correctly model and display that list in a table if I wanted to group the list by location? And what if I wanted to group the list by two properties, for example, Location and CustomerId?