score:1

You need to use DefaultIfEmpty() for an outer join:

from ta in context.test_attempt
join uf in context.user_flag on ta.users.USERID equals uf.UserID into g
from uf in g.DefaultIfEmpty()
select new { ta, uf }

Your outer from/select above is unnecessary, just project ta and uf into what you need.

score:0

You will find examples of different LINQ joins here: http://code.msdn.microsoft.com/LINQ-Join-Operators-dabef4e9 and loads of other LINQ examples too.

score:0

Entity framework in .NET 3.5 doesn't offer left join in Linq queries. The way to get "joined records" is through navigation property between entities

From here: Left Outer Join in Entity Data Model asp.net


Related Articles