score:3

Accepted answer

the short answer is: you can't.

you can do something like:

var q = from account in datacontext.accounts
    where account.amount < 1000
    select account;

datacontext.deleteallonsubmit(q);

but, because the framework needs to track concurrency issues it will always execute separate deletes (so if you have 500 rows that would be deleted, it will send 500 delete statements)

for a longer version and a solution see: http://www.aneyfamily.com/terryandann/post/2008/04/batch-updates-and-deletes-with-linq-to-sql.aspx


Related Query

More Query from same tag