我正在尝试从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 的问题。谁能告诉我这个错误的原因以及如何解决它?