Knight Data Access Layer
Creating Tables From Classes VB.NET
Basic Tasks VB.NET > Creating Database Structure > Creating Tables From Classes VB.NET

Below is an example of creating a database table.  The SQL is automatically generated for the specific database provider (SqliteProvider, SqlServerProvider etc.).  The same code can be used for different types of database providers.

 

'Get the current instance of the helper

Dim db As IDataHelper = DataHelper.SessionFactory() 

 

db.CreateTableFromClass(Of SalesPeople)()