Dynamic LINQ DateTime Comparison String Building - Linq To Entities

前端 未结 5 1357
慢半拍i
慢半拍i 2020-12-19 04:54

I\'m using the dynamic LINQ library by Scott Guthrie together with Entity Framework and C#.

I have to build my where string into a variable based on several factors

5条回答
  •  天涯浪人
    2020-12-19 05:39

    It seems what I was trying to do is not possible with the current DynamicLINQ library. The reason it didn't work was well outlined below by Tilak.

    My solution was to modify the DynamicLINQ library to allow the query to be written as a string and passed to the where clause for Date/Time datatypes. The modification was found here by Paul Hatcher: LINQ TO SQL, Dynamic query with DATE type fields

提交回复
热议问题