我有datetime变量officeStartTime,其日期时间值为
officeStartTime = {9/24/2013 10:00:00 AM}
我有模块CHECKINOUT包含userid,checktime和其它性质.
现在我想要的是获取CHECKINOUT其时间部分检查时间大于时间部分的条目列表officeStartTime.
我尝试:
var checklist= con.CHECKINOUTs.Where(x => x.CHECKTIME.TimeOfDay > officeStartTime.TimeOfDay);
checklist 包含以下错误:
{"The specified type member 'TimeOfDay' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported."} .
它表示TimeOfDay在LINQ to Entities中不支持,如果是这样,我如何在LINQ中检查日期时间的一部分.有没有其他方法可以做到这一点?请建议我做什么.
谢谢.