If you want to delete all records from the table, follow these steps:
context.Entities.DeleteAllOnSubmit(dc.Entities);
DeleteAllOnSubmit accepts an enumerated collection, and while I have not tried it, it must support this (since dc.Entities is a table), which should delete all entities.
You must do this for all tables; you cannot just issue one command for this. In addition, you can create a procedure with all deletions and simply execute it by adding proc to the list of methods.
In addition, it should be noted that it is faster to roll back and recreate tables in the database than to actually perform all these deletions, FYI, if you have a fairly large result installed in the database.
source share