Reputation: 35
I have an orders List like : <Id,Date,List> Now I want to group the List By product Id from that list But I didn't found a way to write
from vente in OrdersList
group products by OrdersList.Product.Id
Upvotes: 1
Views: 41
Reputation: 460158
You want to group by the property of vente
not by the list itself:
var query = from vente in OrdersList
group vente by vente.Product.Id into productGroup
select ...
Upvotes: 1