score:3

Accepted answer

You can join all the tables:

from t3 in Table3
join t2 in Table2 on t3.Table2_FK equals t2.ID
join t1 in Table1 on T2.Table1_FK equals t1.ID
where t2.property == "some value" && t1.property == "some other value"
select t1;

(edit)

I doesn't go just one level deep. In fact, your first example should work. Of course, your relations must be N to 1:

Table3 (n) --- (1) Table2 (n) --- (1) Table1

given t3 of Table3 you can do:

t3.Table2.Table1

Do you have the proper connection between Table2 and Table1 in the .dbml file?


Related Articles