Combine Predicates in Linq-to-entities

后端 未结 1 1622
南笙
南笙 2021-01-19 01:40

I want to dynamically build my list of where conditions. Here\'s a snippet of my code:

protected Expression> _wherePredic         


        
相关标签:
1条回答
  • 2021-01-19 01:58

    Turns out, you need to add this:

    Results = query.AsExpandable.Where(_wherePredicate).ToList();

    And then it just magically works!

    I followed this tutorial: http://www.albahari.com/nutshell/predicatebuilder.aspx

    0 讨论(0)
提交回复
热议问题