asp.net-core-mvc – EF7和GroupBy()无法翻译

我在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.有没有办法让它在服务器上运行?

解决方法

此时,EF7不支持group by和大多数子查询.

相关文章

### 创建一个gRPC服务项目(grpc服务端)和一个 webapi项目(...
一、SiganlR 使用的协议类型 1.websocket即时通讯协议 2.Ser...
.Net 6 WebApi 项目 在Linux系统上 打包成Docker镜像,发布为...
一、 PD简介PowerDesigner 是一个集所有现代建模技术于一身的...
一、存储过程 存储过程就像数据库中运行的方法(函数) 优点:...
一、Ueditor的下载 1、百度编辑器下载地址:http://ueditor....