Search code examples
c#databaselinqentity-frameworklinq-to-entities

Bulk-deleting in LINQ to Entities


Is there any way to bulk-delete a bunch of objects matching a given query in LINQ or LINQ-to-Entities? The only references that I can find are outdated, and it seems silly to iterate over and manually delete all objects I wish to remove.


Solution

  • The question is an old one (from before EF5 existed). For anyone who's using EF5, EntityFramework.Extended does this in a snap.