Use predicateBuilder with .Where method



Howdy all, after glancing through the categories available, I don't see C# as an option, so I'm guessing no one on this forum will be able to help me. Basically, I've started developing in C# and am trying to query a SQL db using a LINQ (Language integrated query) expression.

The following works in LinqPad (IDE for testing queries against a DB):
Group_Employees.Where(x => x.EndDate >= DateTime.Now && x.GroupId == 132 || x.GroupId == 134) however, it does not work in Visual Studio.
The result set I'm getting back from the query is being fed into a predicateBuilder list which seems to be choking on the .Where method. If that makes any sense...

Have had a hard time finding any decent answers on Stack Overflow which seems to be where a lot of C# / LINQ topics are posted. Any thoughts or suggestions you might have would be much appreciated.
Kind regards,


Usually topics about languages not listed in the categories will go under "General Web Development". I'm going to move this topic there to maybe increase your chances for a response.


@WebMachine Thanks much! I'll use the "General Web Development" category for questions like this in the future.

closed #4

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.