vbでSQLクエリをlinqクエリに変換しようとしています。しかし、構文を正しくするのに問題があります。
元のクエリ
SELECT b.*
FROM History_Table_B b
INNER JOIN Employee e ON b.EmployeeId = e.EmployeeId
INNER JOIN Company c ON e.CompanyId = c.CompanyId
WHERE e.AncillaryId = @AncillaryPersonId
AND c.AncillaryId = @AncillaryCompanyId
AND (b.EndDate is null OR b.EndDate >= convert(date, GetDate()))
マイリンク
Dim result = From b In context.H_Table_B
Join employee In context.Employees
On b.EmployeeId Equals (employee.EmployeeId)
Join company In context.Companies
On employee.CompanyId Equals (company.CompanyId)
Where employee.AncillaryId Equals(iPerId)
And company.AncillaryId Equals (iCompanyId)
And ((b.EndDate Is Nothing) Or (b.EndDate Equals(DateTime.Today)))