How can I delete 1,000 rows with EF6?
EF 6 as far as I know introduced the .RemoveRange() option on your DbContext. So in short, you can do something like the following: var db = new MyDbContext(); var itemsToDelete = db.MyTable.Where(x=>!x.active); db.MyTable.RemoveRange(itemsToDelete); db.SaveChanges(); So instead of having to do any type of foreach, you can utilize this new extension method. With your Unit … Read more