none
DateTime compare or filter when use "Where" of EF4.1 Not work RRS feed

  • 问题

  • I am a new one on EF. I want to select all the records which is created today.

    so I code:

    content.XXRecords.where(r => r.ModifyDateTime >= DateTime.Today || r.CreatedDateTime >= DateTime.Today );

    But the result is null and the number is 0. There is really one record created just few minutes ago.

    so confused????

    Then I debug it, when try to calculate the "content.XXRecords.where(r => r.ModifyDateTime >= DateTime.Today || r.CreatedDateTime >= DateTime.Today )"

    It says "expression can not include lambda expressions" ???

    2012年8月2日 2:57

答案