title: Check if list of entities already exist in Database using linq to entities
body: <p>I have a list of entities coming from an external source. I need to compare it to what I already have, and only add the ones that don't exist. Pseudo code below.</p>
  
  <pre><code> var newVersions = item.Versions
        .Where(s =&gt; db.ExistingVersions
             .Select(t=&gt;t.versionID)
             .DoesNotContains(s.versionID));
  </code></pre>
  
  <p>That obviously doesn't work, and I'm not sure how to fix it. I don't want to use a for loop because I believe that would mean I would have hundreds of database hits just to check the versions on each item. I am loading multiple items, each item has as many as 100 versions.</p>