I’m writing a linq-to-sql query that joins 4 tables. I have something like this:
var MyQuery = from a in MyDC.Table1
from b in MyDC.Table2
from c in MyDC.Table3
from d in MyDC.Table4
where .....
My question is about the where clause(s). I could write the where clause in one like this:
where a.PropX == b.PropY && b.PropX == c.PropZ && ....
or multiple clauses like this:
where a.PropX == b.PropY
where b.PropX == c.PropZ
...
Is there going to be any difference in choosing one option or the other?
Thanks for your suggestions.
I would prefer neither of the above; instead I would follow the SQL syntax, which doesn’t hide the intent of the query as so: