title: Entity Framework - "Unable to create a constant value of type 'Closure type'..." error
body: <p>Why do I get the error:</p>
  
  <blockquote>
    <p>Unable to create a constant value of type 'Closure type'. Only
    primitive types (for instance Int32, String and Guid) are supported in
    this context.</p>
  </blockquote>
  
  <p>When I try to enumerate the following Linq query?</p>
  
  <pre><code>IEnumerable&lt;string&gt; searchList = GetSearchList();
  using (HREntities entities = new HREntities())
  {
     var myList = from person in entities.vSearchPeople
     where upperSearchList.All( (person.FirstName + person.LastName) .Contains).ToList();
  }
  </code></pre>
  
  <p><strong>Update</strong>:
  If I try the following just to try to isolate the problem, I get the same error:</p>
  
  <pre><code>where upperSearchList.All(arg =&gt; arg == arg) 
  </code></pre>
  
  <p>So it looks like the problem is with the All method, right? Any suggestions?</p>