Linq to Sql:如何快速清除表 [英] Linq to Sql: How to quickly clear a table
本文介绍了Linq to Sql:如何快速清除表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
要删除表中的所有行,我目前正在执行以下操作:
To delete all the rows in a table, I am currently doing the following:
context.Entities.DeleteAllOnSubmit(context.Entities);
context.SubmitChanges();
但是,这似乎需要花很多时间.有没有更快的方法?
However, this seems to be taking ages. Is there a faster way?
推荐答案
查看全文