【发布时间】:2014-06-12 01:40:17
【问题描述】:
我正在尝试从 MySQL 客户端运行以下 Linq 查询
query = query.Where(c => c.CustomerRoles
.Select(cr => cr.Id)
.Intersect(customerRoleIds)
.Any()
);
这段代码看起来不错,但报错:
System.NotSupportedException: Specified method is not supported.at MySql.Data.Entity.SqlGenerator.Visit(DbIntersectExpression expression)
这在我看来像是 .Intersect 的问题。谁能告诉我这个错误的原因以及如何解决它?
【问题讨论】:
标签: mysql linq entity-framework c#-4.0 linq-to-mysql