任何人都可以告訴我什麼可能是錯誤的日期比較在這裏?Lightswitch查詢中的DataServiceOperationException
無財產「日期」 60位「reffering到s.SwipeDateTime.Value.Date」
var lastSwipe = (from s in this.DataWorkspace.ApplicationData.EmployeeSwipeLogs
where s.Employee.Id == emp.Id &&
s.SwipeIsValid == true &&
s.SwipeDateTime.Value.Date == DateTime.Today
orderby s.SwipeDateTime descending
select s).FirstOrDefault();
要在查詢之前嗎? – cmaduro
@cmaduro:是的,作爲一個局部變量。然後表達式'DateTime.Today'不需要翻譯。 –