Composing Expression> predicates

c# entity-framework extension-methods iqueryable lambda

Question

I have a procedure that provides an

Expression<Func<T, bool>> 

This works ok when I use it as a predicate in an EF where clause up until I try to use Expression to add more items to the predicate. I have the following issue when using Or():

The parameter 'xxx' was not bound in the specified LINQ to Entities query expression.

Is there a workaround for this? What specifically causes this?

SOLVED

by http://blogs.msdn.com/b/meek/archive/2008/05/02/linq-to-entities-combining-predicates.aspx

1
2
3/20/2013 1:05:20 PM

Popular Answer

You can apply the formula OR like AND zzz-5 zzz.

2
3/20/2013 9:42:24 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow