“The specified type member 'Date' is not supported in LINQ ”

后端 未结 4 920
野性不改
野性不改 2020-12-11 08:10
_dbEntities.EmployeeAttendances.Where(x => x.DailyDate.Date.Equals(DateTime.Now.Date)).ToList();

\"The specified type member \'Da

4条回答
  •  甜味超标
    2020-12-11 09:06

    Dont use EntityFunctions in EF 6. TruncateTime is in the DbFunctions class:

    DbFunctions.TruncateTime(x.DailyDate)
    

提交回复
热议问题