title: Using Linq to determine if a record does not exist in a list but does exist in a table
body: <p>I am having trouble determining if a record exists in the database table but not in the updated records contained within a list. If the record does not exist within the updated list but does within the database table then that record needs to deleted.</p>
  
  <p>I can query the table to determine if it has been modified and if the record does not exist in the database table then update it, but determining the opposite is proving a bit more tricky. Another constraint is that I need the outcome to be a bool value of exists = true and not exist = false so that i can than handle the deleting of the record appropriately.</p>
  
  <p>I am doing this to determine if the record does not exist in the database table:</p>
  
  <pre><code>bool exists = db.table.Any(t =&gt; t.EntityID != list.EntityID)
  </code></pre>
  
  <p>But can not seem to manage the reverse.</p>
  
  <p>The list and the database table have 1 to 1 mapping using Entity Framework.</p>
  
  <p>If record exists in database but not in list then delete.</p>