我在EF7 Beta 8上運行以下代碼:
var locationGrops = from l in db.Locations
group l by l.ServiceType into g
select g;
var list = locationGrops.ToList();
當我執行此代碼時,EF會顯示警告。
warning : [Microsoft.Data.Entity.Query.QueryCompilationContext] The LINQ express
ion 'GroupBy([l].ServiceType, [l])' could not be translated and will be evaluate
d locally.
查詢對我來說似乎很基礎,SQL中有GROUP BY。有沒有辦法讓它在服務器上運行?