Method EmptyTable
- Namespace
- YndigoBlue.Velocity.Engine
- Assembly
- YndigoBlue.Velocity.dll
EmptyTable(Table)
Deletes all records from a table while keeping the table structure intact.
public void EmptyTable(Table table)
Parameters
Examples
using (var m = new Manager(conn))
{
var schema = m.LoadSchema("app");
var table = schema["logs"];
// Delete all records from the table
m.EmptyTable(table);
Console.WriteLine("All records deleted");
}
Exceptions
- DbException
Thrown when a database error occurs.