Knight Data Access Layer
Table Exists
Basic Tasks C# > Database Commands > Table Exists

Check to see if a table exists.

 

//Get the current instance of the helper

IDataHelper db = DataHelper.SessionFactory();

 

//check for table existence

bool exists = db.TableExists("Person");

 

OR

 

bool exists = db.TableExists<Person>();