Ninja Database Pro
Storage Property
Example 



KellermanSoftware.NinjaDatabasePro Namespace > NinjaDbPro Class : Storage Property
Where to store the data for the database. Default is IsolatedStorage.
Syntax
Public Property Storage As IStorage
Dim instance As NinjaDbPro
Dim value As IStorage
 
instance.Storage = value
 
value = instance.Storage
public IStorage Storage {get; set;}
public:
property IStorage^ Storage {
   IStorage^ get();
   void set (    IStorage^ value);
}
Example
NinjaDbPro db = new NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName");
             
            //Licensed Mode
            //db.UserName = "John Smith 101224";
            //db.LicenseKey = "aousdf832jasf==";
             
            //Default is an IsolatedStorageDatabase. This is unneeded.
            db.Storage = new IsolatedStorageDatabase();
            db.OpenDatabase();
            db.CloseDatabase();
             
            //Create an in memory database
            db.Storage = new MemoryDatabase();
            db.OpenDatabase();
            db.CloseDatabase();
             
            //Create a file database
            db.Storage = new FileDatabase();
            db.OpenDatabase();
            db.CloseDatabase();
Dim db As New NinjaDbPro("MyDatabaseDirectory", "MyDatabaseName")
             
            'Licensed Mode
            'db.UserName = "John Smith 101224";
            'db.LicenseKey = "aousdf832jasf==";
             
            'Default is an IsolatedStorageDatabase. This is unneeded.
            db.Storage = New IsolatedStorageDatabase()
            db.OpenDatabase()
            db.CloseDatabase()
             
            'Create an in memory database
            db.Storage = New MemoryDatabase()
            db.OpenDatabase()
            db.CloseDatabase()
             
            'Create a file database
            db.Storage = New FileDatabase()
            db.OpenDatabase()
            db.CloseDatabase()
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

NinjaDbPro Class
NinjaDbPro Members