LINQ-to-entities: predicating on a DateTime field causes AccessViolationException
问题 I have the following code: var dtThreshold = DateTime.Now.AddDays(-1); using (var db = new TermbaseEntities()) { var tc = (from termChanges in db.st_element_audit_log where termChanges.element_type_id == (long) ElementType.Term && termChanges.recorded > dtThreshold select termChanges).ToArray(); ... } In the DB entities, st_element_audit_log.recorded is a DateTime property. It's a fairly trivial statement, but running it causes the following exception: Unhandled Exception: