Knight Data Access Layer
Change Database
Basic Tasks C# > Database Commands > Change Database

For non file based databases such as MySQL, Oracle, and SQL Server, the database can be changed.

 

//Get the current instance of the helper

IDataHelper db = DataHelper.SessionFactory();

 

db.ChangeDatabase("InvoiceDatabase");