Hi guys, I have a question about Linq.
I am grouping the result in a zipcode client. For each zip code I want to see the number of orders and the number of equipment ordered.
So far, my code looks like this:
var statistics = from b in db.Bookings
from c in db.Customers
where b.customerID == c.id
group c by c.zipcode into stat
select new {
Zipcode = stat.Key,
NumberOfBookings = stat.Count()
};
These code groups lead to zip codes and give me the number of orders in each zip code. How can I get the amount of equipment?
source
share