我正在尝试将日期与 SQL 中的日期时间字段进行比较。我试试这个:
Dim entry = db.Tbl_Hydrations.Where(Function(x) x.Hyd_Create_Date.Date = _date1)
但是,我得到的错误是:
The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
在线的:
If entry.Any Then