My code:
Code: Select all
var streamReader = new StreamReader(pRestoreFilePath, Encoding.UTF8);
if (mSqLiteConnection.State != ConnectionState.Open)
mSqLiteConnection.Open();
var sqSqlDump = new SQLiteDump {Connection = mSqLiteConnection};
SQLiteTransaction transaction = mSqLiteConnection.BeginTransaction(IsolationLevel.ReadCommitted);
sqSqlDump.Restore(streamReader);
transaction.Commit();