0
我想結束一個列表,根據用戶標識對我的類別進行分組。你如何在你的SQL上使用Group Statement來Linq查詢?
IEnumerable<JoinClass> catList =
from c in db.Users2
join e in db.Categories on c.Id_Users equals e.FK_Users
where c.EEID == UserEEID
group e.Category by c.EEID in z
select new JoinClass
{
Category = e.Category,
EEID = c.EEID,
};
return View(catList.ToList());
你不顯示JoinClass的定義。另外,這段代碼如何不適合你? – Hogan