title: Deleting multiple records at a time entities framework 5
body: <p>I created a MVC application using entity framework 5. I need to delete data from table using query. I have done one record delete, But now i have requiment to delete multiple records at a time. </p>
  
  <pre><code>My Table USER:
  Id      Name     cityId
  1       Rajesh      1
  2       Rahul       1
  3       Sulagna     1
  4       Rajoshri    2
  5       Deb         2
  </code></pre>
  
  <p>Now i need to delete where cityid = 1</p>
  
  <p>Code which i have tried:</p>
  
  <pre><code>List&lt;USER&gt; listUser = new List&lt;USER&gt;();
  listUser = db.USERs.Where(w =&gt; w.cityId == 1).ToList();
  db.Entry(listUser).State = System.Data.EntityState.Deleted;
  db.SaveChanges();
  </code></pre>
  
  <p>But its giving error.</p>
  
  <p>I have searched and found a RemoveRange method to delete multiple records. But RemoveRange is not availabel in my project.</p>