There are many ways to do something with LINQ, sometimes I find that if I find it difficult to find a solution using a combination of existing extension methods, I will simply write a connection (since you will be in sql) using LINQ. Joining below does not require the actual βjoin onβ part, because EF will use your existing mappings (navigation properties) to create the junction for you.
var query = from a in Ta from b in Tb from c in Tc where C.Id == myParam select new { A = a, B = b, C = c};
From here you have an anonymous type that has data from all three tables. The best part is that EF will automatically commit your objects, which means that you can only return A from your method and be able to traverse it to get B and C.
e36M3 source share