Knight Data Access Layer
SessionFactory Method
Example 




KellermanSoftware.NetDataAccessLayer Namespace > DataHelper Class : SessionFactory Method
Get a thread static safe Data Helper Session. The session is automatically created on the first access. The same session is retrieved per thread after the first call.
Syntax
Public Shared Function SessionFactory() As IDataHelper
Dim value As IDataHelper
 
value = DataHelper.SessionFactory()
public static IDataHelper SessionFactory()
public: static IDataHelper* SessionFactory(); 
public:
static IDataHelper^ SessionFactory(); 
Example
//Get the current thread static safe instance of the helper
IDataHelper db = DataHelper.SessionFactory();
'Get the current thread static safe instance of the helper
Dim db As IDataHelper = DataHelper.SessionFactory()
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataHelper Class
DataHelper Members