I've a large table of Items and I need to organize them by Category, then by Year and then by Month.
Item has CategoryID and Dated properties.
I got this far:
Dim Items = From Item In DB.Items _
Group By CategoryID = Item.CategoryID _
Into Categories = Group _
Order By CategoryID
But where I put the:
Group By Year = Year(Item.Dated)
and the
Group By Month = Month(Item.Dated)
The final result should be something like this:
For Each Category in Categories
For Each Year in Category.Years
For Each Month in Year.Months
For Each Item in Month.Items
Next
Next
Next
Next
Thanks