Knight Data Access Layer
Generating Upgrade Scripts
Basic Tasks C# > Generation > Generating Upgrade Scripts

Use the GenerateUpgradeNamespaceSql to create the SQL to add missing tables and columns to the database.

 

//Get the current instance of the helper

IDataHelper db = DataHelper.SessionFactory();

 

//Get the SQL to add missing tables and missing columns for the namespace

string sql = db.GenerateUpgradeNamespaceSql("AcmeCorporation.InvoiceSystem");