Dynamic where clause in LINQ - with column names available at runtime

后端 未结 4 2145
没有蜡笔的小新
没有蜡笔的小新 2021-02-06 02:47

Disclaimer: I\'ve solved the problem using Expressions from System.Linq.Expressions, but I\'m still looking for a better/easier way.

Consider the following situation :

4条回答
  •  一整个雨季
    2021-02-06 03:30

    Since this is not LINQ to Objects, but rather LINQ to SQL, you have no other alternative beside using either Expressions or a stored procedure.

提交回复
热议问题