Siaqodb stores its data in a file called data.mdb within a folder on disk. As a best practice we recommend opening a database only once and then using that database instance throughout your application. The examples below show factory classes that create and open Siaqodb database instances for each platform supported:

.NET

class SiaqodbFactory
{
       private static Siaqodb instance;

       public static Siaqodb GetInstance()
       {
             if (instance == null)
             {
                  instance = new Siaqodb(@"D:\databases\sdb");
             }

            return instance;
        }
}

WindowsStore OR WindowsPhone

class SiaqodbFactory
{
       private static Siaqodb instance;

       public static Siaqodb GetInstance()
       {
             if (instance == null)
             {
                  string objPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path;                  
                  instance = new Siaqodb(objPath);
             }

            return instance;
        }
}

Xamarin.iOS

class SiaqodbFactory
{
       private static Siaqodb instance;

       public static Siaqodb GetInstance()
       {
              if (instance == null)
              {
                     string dbPath= Environment.GetFolderPath (Environment.SpecialFolder.Personal);
                     instance = new Siaqodb(dbPath);
              }
              return instance;
       }

}

Xamarin.Android

class SiaqodbFactory
{
       private static Siaqodb instance;

       public static Siaqodb GetInstance()
       {
              if (instance == null)
              {
                     string dbPath= Environment.GetFolderPath (Environment.SpecialFolder.Personal);
                     instance = new Siaqodb(dbPath);
              }

              return instance;
       }

}