title: Bulk deleting rows with RemoveRange()
body: <p>I am trying to delete multiple rows from a table.</p>
  
  <p>In regular SQL Server, this would be simple as this:</p>
  
  <pre><code>DELETE FROM Table
  WHERE
      Table.Column = 'SomeRandomValue'
      AND Table.Column2 = 'AnotherRandomValue'
  </code></pre>
  
  <p>In Entity Framework 6, they have introduced <a href="http://msdn.microsoft.com/en-us/library/system.data.entity.dbset.removerange%28v=vs.113%29.aspx" rel="noreferrer">RemoveRange()</a> method.<br>
  However, when I use it, rather than deleting rows using the where clauses that I provided, Entity Framework queries the database to get all rows that match the where clauses and delete them one by one using their primary keys.</p>
  
  <p>Is this the current limitation of EntityFramework?
  Or am I using <code>RemoveRange()</code> wrong?</p>
  
  <p>Following is how I am using <code>RemoveRange()</code>:</p>
  
  <pre><code>db.Tables.RemoveRange(
      db.Tables
          .Where(_ =&gt; _.Column == 'SomeRandomValue'
              &amp;&amp; _.Column2 == 'AnotherRandomValue')
  );
  </code></pre>