August 2010 Entries

quick fix: Predicatebuilder not stacking queries issue inside for loop

I ran into this problem this morning and thought I’d share in case someone else has this issue .So I’m using PredicateBuilder with the EntityFramework and doing some pretty basic query building. I have a list of business types that the person can select (a checkboxlist) and then it returns everything that matches. I was having an issue because it was only ever returning the businesses that matched the last item I selected—it wasn’t stacking the query at all. Finally, I noticed what was going on. ......