0
我想加入我的LINQ查詢與另一個表。我如何在客戶表中顯示名稱?我收到一個錯誤:不包含'Name'的定義?linq表達式錯誤:不能顯示列?
from p in Purchases
join c in Customers on p.CustomerID equals c.ID
group p by p.Date.Year into SalesPerYear
select new {
customername= SalesPerYear.First().Name,
customerid= SalesPerYear.First().CustomerID,
totalsales= SalesPerYear.Sum(x=>x.Price)
}