title: Error with Entity Framework .Any() filter
body: <p><strong>Here's my query:</strong></p>
  
  <pre><code>var x = db
     .Users
     .Where(u =&gt; u.Locations.Any(l =&gt; searchedLocation.Counties.Any(c =&gt; c.LocationId == l.LocationId));
  </code></pre>
  
  <p><strong>Context:</strong></p>
  
  <ul>
  <li><code>Users</code> is <code>IQueryable&lt;User&gt;</code>. (EF object set)</li>
  <li><code>searchedLocation</code> is a <code>Location</code> object.</li>
  <li><code>Counties</code> is a <code>ICollection&lt;MiniLocation&gt;</code>.</li>
  </ul>
  
  <p><strong>What i'm trying to do:</strong></p>
  
  <blockquote>
    <p>Return all users, where any of the Counties for those locations have a locationId of any of the counties belonging to the searched location.</p>
  </blockquote>
  
  <p><strong>Example:</strong></p>
  
  <p>Search for New York City (LocationId = 1. County1LocationId = 2)</p>
  
  <p>User: Bob. Locations: Soho. County1LocationId = 2. County2 LocationId = 3.</p>
  
  <p>So that's a match. (because Soho have a County with a LocationId of 2, and so does NYC)</p>
  
  <p><strong>Error i receive:</strong></p>
  
  <blockquote>
    <p>Unable to create a constant value of type 'xxx.xxx.Locations.MiniLocation'. Only primitive types ('such as Int32, String, and Guid') are supported in this context.</p>
  </blockquote>
  
  <p>Any ideas?</p>