Knight Data Access Layer
Mapper Property (IDataHelper)
Example 




KellermanSoftware.NetDataAccessLayer Namespace > IDataHelper Interface : Mapper Property
Map objects, table names, and sql to database tables
Syntax
ReadOnly Property Mapper As IAutoMap
Dim instance As IDataHelper
Dim value As IAutoMap
 
value = instance.Mapper
IAutoMap Mapper {get;}
__property IAutoMap* get_Mapper();
property IAutoMap^ Mapper {
   IAutoMap^ get();
}
Example
//Get the current thread static safe instance of the helper
IDataHelper db = DataHelper.SessionFactory();
 
//Specify User Name and License Key from the receipt, leave blank for trial mode
//db.UserName = "John Smith 1234";
//db.LicenseKey = "asdfl219==";
 
db.OpenConnection();
 
//Get the meta data for a table without mapping it to a class
Table tableByDb = db.Mapper.GetTableNameMap("Persons");
 
//Get meta data for a table and map the fields to the object
Table tableByObject = db.Mapper.GetObjectMap(typeof (Person));
 
db.CloseConnection();
'Get the current thread static safe instance of the helper
Dim db As IDataHelper = DataHelper.SessionFactory()
 
'Specify User Name and License Key from the receipt, leave blank for trial mode
'db.UserName = "John Smith 1234"
'db.LicenseKey = "asdfl219=="
 
db.OpenConnection()
 
'Get the meta data for a table without mapping it to a class
Dim tableByDb As Table = db.Mapper.GetTableNameMap("Persons")
 
'Get meta data for a table and map the fields to the object
Dim tableByObject As Table = db.Mapper.GetObjectMap(GetType(Person))
 
db.CloseConnection()
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

IDataHelper Interface
IDataHelper Members