TRUNCATE method is used to delete existing records in a table like DELETE. This process also executes the UPDATE STATISTICS for tables, after DELETE operation.
This method may needs some privilege according to the database product and its version.
Examples
Following section demonstrates TRUNCATE the table(s).
using(var exc = cn.Executer())
{
// by table alias
var t0 = new Orders().AsQueryable();
var t1 = new OrderDetails().AsQueryable();
exc.TruncateTable(t0); // single
exc.TruncateTable(new [] {t0, t1}); // multi
// by table type
exc.TruncateTable<Orders>();
// by table name
exc.TruncateTable("table1");
}