I need to create a statement in LINQ with 3 tables and OR condition.
My function receives an integer, lets call it intZ. I have 3 tables: tableA, tableB and tableC.
tableA has columns int1, int2 and intB. intB is related to tableB.
problem: int1 or int2 of tableA can be intZ and it has to match with one tableC record.
I need an OR condition, but I have no idea where to place it. Does it go in the where clause? Or in the equals clause?
At the moment, I know how to join 3 tables, but the condition is killing me.
What is the difference between the two ways to create statements in linq? Is there a performance impact?
edit: Okay, now I think it’s more clear. intZ has to be related with intC from tableC, and this number can be int1 or int2 of tableA.

Just add it to a
Where. In Linq2Sql this will be translated to an inner join (with or) on tableB