If there is a suitable approach to mass delete or remove several rows using Entities Framework 4, please let me know. There doesn't seem to be a DeleteAll command. I want to remove a list of entities, however the only one that is accessible is DeleteObject(), which only accepts one item. Is there an alternative to iterating over the list? I did come across an article that prepared some sql and used ExecuteStoreQuery to carry out the deletion. Is there a more effective method than executing any of these two choices? Please advise on the most effective manner to carry out this task.
There isn't currently a classy method to do this. You'll need to loop through the list, you're right.
How do I remove many rows at once using Entity Framework? (without foreach) This SO post contains some interesting conversations on the subject.