我的疑问是:
var query = from a in tableA
join b in tableB
on tableA.ID
equals tableB.ID
join c in tableC
on tableA.ID
equals tableC.ID
where a.ID == "0001"
&& (from d in tableD
where
d.Flag == "1" &&
d.Address == c.Address
).Any()
select new
{
a.Name,
b.Price,
c.Address
}
当我使用.Any()函数删除条件时,它运行正常。当LINQPad运行正常时,为什么VS返回错误?运行原始的SQL等效项,即EXESTS,如果我没有弄错,运行正常并给出正确的结果。感谢任何帮助。