Public Overloads Function Load( _ ByVal type As Type, _ ByVal primaryKey As Long _ ) As Object
Dim instance As NinjaDbPro Dim type As Type Dim primaryKey As Long Dim value As Object value = instance.Load(type, primaryKey)
public object Load( Type type, long primaryKey )
public: Object^ Load( Type^ type, int64 primaryKey )
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(); Person person = new Person(); person.DateCreated = DateTime.Now; person.Name = "Greg"; db.Save(person); Person personCopy = db.Load<Person>(person.PersonId); db.CloseDatabase();
Dim db As 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() Dim person As New Person() person.DateCreated = Date.Now person.Name = "Greg" db.Save(person) Dim personCopy As Person = db.Load(Of Person)(person.PersonId) db.CloseDatabase()
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