Dynamic Where Clause over relational tables with LINQ to SQL

前端 未结 4 1522
既然无缘
既然无缘 2021-01-05 11:37

I need help for a dynamic where clause over relational tables (one to many) in LinqToSql.

User select conditions from page. (there is 4 input that u

4条回答
  •  自闭症患者
    2021-01-05 11:47

    RobS supplied what I think is the most attractive solution. However, this is the method I was using but then I realized that it is actually performing the first query in full (Linq-To-SQL) and then the subsequent .Where() clauses are performed with just LINQ. So this is not a viable solution as the entire set of data is enumerated and then filtered out aftwerwards in memory.

    Please correct me if I'm wrong - but this is what I've noticed.

提交回复
热议问题