我正在尝试使用 VB 进行连接查询 Linq。我想返回最大 EnterTime,但出现错误,说“
无法将 System.Linq.Iqueryable(Of Date) 转换为 System.Nullable(Of Date)
我该如何解决这个问题?
Dim results =
From b In context.H_Beneficiary
Join e In context.Employees On b.EmployeeId Equals (e.EmployeeId)
Join c In context.Companies On e.CompanyId Equals (c.CompanyId) _
Where e.IntegrationId.Equals(c.CompanyId) _
And (b.EndDate Is Nothing Or b.EndDate >= DateTime.Today)
Select b.EnterTime