I am trying to convert this SQL statement into LINQ
SELECT
a.UserId, b.Date, a.Value1
FROM
web.Table2 AS b
LEFT OUTER JOIN
web.Table1 AS a
ON
b.Date = a.CreateDate AND UserId = 1
This is what I have that is not working:
Dim query = From a In ctx.Table1 _
Group Join b In ctx.Table2 On b.Date Equals a.CreateDate Into group1 = Group
From x In group1.DefaultIfEmpty() _
Where ls.UserId = 1 _
Select a.UserId, x.Date, a.Value1
You could always directly execute your query in LINQ To SQL, e.g.: