Knight Data Access Layer
Using Your License Key
Licensing > Using Your License Key

Get a Session Reference

Use the SessionFactory() method to get a thread static safe session.  The session will be created once per thread.  The config settings will be retrieved when the session is created. 

 

//Get a thread static safe session

IDataHelper db = DataHelper.SessionFactory();

 

Set Licensing

The default is a 30 day trial mode.  Skip this step if you are doing a trial.  After you receive your user name and license key during the purchase process, set it.

db.UserName = "John Smith 1234";

db.LicenseKey = "a9sdkw==";