ASP.NET search form - dynamic Linq to SQL?

前端 未结 3 1397
自闭症患者
自闭症患者 2021-02-10 04:27

I have a search form that allows users to search on several different fields in several different ways. Here is an example of my code.

var claims = from c in db.         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-10 05:28

    Have you tried dynamic LINQ? It allows you to build string-based query statements similar to a SQL WHERE clause.

    http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx

提交回复
热议问题