Where...In Clause
Posted: Mon 30 Mar 2009 19:50
I have a problem when trying to execute a Linq query with a "Where...In" clause. The exception message is "values.Count". Here is a simple example of what I'm trying to execute.
Thank you very much for you help.
Code: Select all
List userIds = new List() { 1, 2, 3 };
var query = from u in context.Users
where userIds.Contains(u.id)
select u.FirstName;