Paweł Sawicz ← Customer Feedback for .NET Data Access My feedback Simple Static Delete and Update Methods 153 votes Vote Vote Vote Sign in prestine Your name Your email address Check! invalid email (thinking…) Reset or sign in with UserVoice password Forgot password? Create a password I agree to the terms of service Signed in as (Sign out) Close Close We’ll send you updates on this idea Subscribe 16 comments · [Closed] Entity Framework Core Feature Suggestions · Flag idea as inappropriate…Flag idea as inappropriate… · Delete… · Admin → Paweł Sawicz commented · January 23, 2013 · Delete… I think there would be nice idea if you give method to delete collection. Without using foreach statement. Now: foreach(var item in collection) { db.Customers.Remove(item); } db.SaveChanges(); and should be simply db.Delete(collection); db.SaveChanges(); Paweł Sawicz supported this idea · January 23, 2013
I think there would be nice idea if you give method to delete collection. Without using foreach statement.
Now:
foreach(var item in collection)
{
db.Customers.Remove(item);
}
db.SaveChanges();
and should be simply
db.Delete(collection);
db.SaveChanges();