//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==";
// Open the database connection
db.OpenConnection();
// Clear table Person
db.TruncateTable("Person");
// Create Persons to save to the database
List<Person> persons = new List<Person>
{
new Person
{
FirstName = "Han",
LastName = "Solo"
},
new Person
{
FirstName = "Luke",
LastName = "Skywalker"
},
new Person
{
FirstName = "Leia",
LastName = "Organa"
},
new Person
{
FirstName = "Obi-Wan",
LastName = "Kenobi"
},
new Person
{
FirstName = "Padme",
LastName = "Amidala"
},
};
// Save them to the database
db.Save(persons);
var result = db.LoadPageWithChildren<Person>(2, 2);
// Close the connection
db.CloseConnection();