When using lambda expressions or anonymous methods in C#, we have to be wary of the access to modified closure pitfall. For example: foreach (var s in strings) { query = query.Where(i => i.Prop == s); // access to modified closure ... } Due to the modified closure, the above code will cause all of the Where clauses on the query to be based on the final value of s. As explained here, this happens b