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(); //Valid only for non Silverlight projects
//database.Storage = new MyDocumentsDatabase(); //Valid for Silverlight 4 Out of Browser
//The database is automatically created if it does not exist
db.OpenDatabase();
//Create a person to insert
Person person = new Person();person.Name =
"John Smith";//The type is automatically registered and an auto increment primary key is created on the first save
db.Save(person);
person.Name =
"John Jones";db.Save(person);
db.Delete(person);
db.CloseDatabase();