title: EF Linq Join an Array to Table
body: <p>I have the following class:</p>
  
  <pre><code>public class Coordinate
  {
      public string lat { get; set; }
      public string lng { get; set; }
  }
  </code></pre>
  
  <p>I create an array of those objects.</p>
  
  <p>I then want to determine if any objects in my array matchs a row (lat and long) in a table :</p>
  
  <pre><code>location = db.Locations.Where(u =&gt; centers.Any(s =&gt; u.Lat.Equals(s.lat)) &amp;&amp; 
                                     centers.Any(s =&gt; u.Lng.Equals(s.lng)))
                         .ToArray();
  </code></pre>
  
  <p>But I get this exception : </p>
  
  <pre><code>Only primitive types or enumeration types are supported in this context.
  </code></pre>