Example #1
0
 /// <summary>
 /// SQLite wrapped Model repository.
 /// </summary>
 /// <param name="connectionString">Connection string to SQLite database file.</param>
 public SQLiteRepository(string connectionString)
 {
     _connectionString = connectionString;
     if (!SQLiteBootstrap.IsInitialized)
     {
         SQLiteBootstrap.Initialize();
     }
 }
Example #2
0
        public static void Initialize()
        {
            // Initialize SqLite
            SQLiteBootstrap.Initialize();

            // Check the type of database
            if (IsInMemory == true)
            {
                // Memory
                ConnectionStringSDS = @"Data Source=:memory:;";
                ConnectionStringMDS = @"Data Source=:memory:;";
            }
            else
            {
                // Local
                ConnectionStringSDS = @"Data Source=C:\SqLite\Databases\RepoDb.db;Version=3;";

                // Local
                ConnectionStringMDS = @"Data Source=C:\SqLite\Databases\RepoDb.db;";

                // Create tables
                CreateSdsTables();
            }
        }
Example #3
0
 public void Initialize()
 {
     SQLiteBootstrap.Initialize();
 }