Entity Framework Dynamic Where Clause

后端 未结 2 723
温柔的废话
温柔的废话 2021-01-02 19:58

I have a query like:

var function = GetSomeExpression();    

using (FooModel context = new FooModel())
{
    var bar = context.Bar.Where(function);
}
         


        
2条回答
  •  别那么骄傲
    2021-01-02 20:42

    see this post

    LINQ to entities - Building where clauses to test collections within a many to many relationship

    Edit: after your post update this doesn't seem relevant anymore; I'll leave it in case it's helpful.

提交回复
热议问题