所以我试着按照this的例子在这个LINQ查询的where子句中有一个子查询。LINQ语句where子句中的子查询
var innerquery =
from app in context.applications
select new { app.app_id };
IEnumerable<postDatedCheque> _entityList = context.postDatedCheques
.Where(e => innerquery.Contains(e.appSancAdvice.application.app_id));
目的是从postDatedCheques有在应用表APP_ID选择那些记录。
但我正在逐渐where子句中以下误差修改:
- 委托“System.Func”不 需要1个参数
- 无法转换lambda表达式到类型“串”,因为它不是 委托类型
- “System.Linq.IQueryable”不包含一个 定义“包含”和最好的扩展方法过载 “System.Linq.ParallelEnumerable.Contains(System.Linq.ParallelQuery, TSource)”有一些无效参数
- 实例参数:无法从 转换 'System.Linq.IQueryable' 到 'System.Linq.ParallelQuery'
我是什么编码不正确的?
这是一个更好的主意。谢谢。 – 2013-04-25 13:10:21