EF7和GroupBy()无法翻译

Ser*_*rov 5 entity-framework-core asp.net-core-mvc

我在EF7 Beta 8上运行以下代码:

var locationGrops = from l in db.Locations
                    group l by l.ServiceType into g
                    select g;

var list = locationGrops.ToList();
Run Code Online (Sandbox Code Playgroud)

当我执行此代码时,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.
Run Code Online (Sandbox Code Playgroud)

查询对我来说似乎很基础,SQL中有GROUP BY.有没有办法让它在服务器上运行?

Dmi*_* S. 4

目前group byEF7 不支持 and 和 大多数子查询。