title: How to delete generic list in entity framework
body: <p>I'm passing generic list to my repository to do the delete.But it's not working for me.please help me to solve this error.</p>
  
  <pre><code>foreach (var item in oOffersQA)
  {
      var record = context.OfferImages.SingleOrDefault(x =&gt; 
          DbFunctions.TruncateTime(x.OfferDate) == 
          DbFunctions.TruncateTime(item.OfferDate)
            &amp;&amp; x.GardenMarkName == item.GardenMarkName
            &amp;&amp; x.InvoiceNo == item.InvoiceNo
       );
       context.Entry(record).State = System.Data.Entity.EntityState.Deleted;
  }
  return context.SaveChanges() &gt; 0;`
  </code></pre>