4
嗨,大家好,我有一個關於Linq的問題。csharp羣問題
我將結果分組在顧客郵政編碼上。對於每個郵政編碼,我希望看到訂購的金額和訂購的設備數量。
到目前爲止,我的代碼如下所示:
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()
};
此碼組結果放入拉鍊碼,給我預訂量在每個郵編。如何獲得設備數量?