Table of Contents

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

table Table

The Table object representing the table to empty.

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.