Load only the properties and fields specified. The format is the ClassName.PropertyName
Performance is not increased, the properties are simply not populated to be used for synchronization scenarios.
Dim instance As NinjaDbPro
Dim primaryKey As Long
Dim propertiesOrFieldsToLoad As List(Of String)
Dim value As T
value = instance.LoadPartial(Of T)(primaryKey, propertiesOrFieldsToLoad)
NinjaDbPro db = new NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName");
//Licensed Mode
//db.UserName = "John Smith 101224";
//db.LicenseKey = "aousdf832jasf==";
//Set before OpenDatabase. Default storage is IsolatedStorageDatabase. Other options are:
//db.Storage = new MemoryDatabase(); //In memory database
//db.Storage = new FileDatabase();
db.OpenDatabase();
//Save a person
Person person = new Person();
person.Name = "Greg";
person.DateCreated = DateTime.Today;
db.Save(person);
//Load a Partial
List<string> fieldsOrPropertiesToLoad = new List<string>();
fieldsOrPropertiesToLoad.Add("Person.DateCreated");
Person personCopy = db.LoadPartial<Person>(person.PersonId, fieldsOrPropertiesToLoad);
Dim db AsNew NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName")
'Licensed Mode
'db.UserName = "John Smith 101224";
'db.LicenseKey = "aousdf832jasf==";
'Set before OpenDatabase. Default storage is IsolatedStorageDatabase. Other options are:
'db.Storage = new MemoryDatabase(); //In memory database
'db.Storage = new FileDatabase();
db.OpenDatabase()
'Save a person
Dim person AsNew Person()
person.Name = "Greg"
person.DateCreated = Date.Today
db.Save(person)
'Load a Partial
Dim fieldsOrPropertiesToLoad AsNew List(OfString)()
fieldsOrPropertiesToLoad.Add("Person.DateCreated")
Dim personCopy As Person = db.LoadPartial(Of Person)(person.PersonId, fieldsOrPropertiesToLoad)
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