我正在尝试将此 SQL 语句转换为 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
这就是我所拥有的不起作用:
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