我正在编写一个连接 4 个表的 linq-to-sql 查询。我有这样的事情:
var MyQuery = from a in MyDC.Table1
from b in MyDC.Table2
from c in MyDC.Table3
from d in MyDC.Table4
where .....
我的问题是关于where
条款的。我可以这样写 where 子句:
where a.PropX == b.PropY && b.PropX == c.PropZ && ....
或像这样的多个子句:
where a.PropX == b.PropY
where b.PropX == c.PropZ
...
选择一个或另一个选项会有什么不同吗?
感谢您的建议。