public Task RunInTransactionAsync(Action <SQLiteConnection> action) { return(Task.Factory.StartNew(() => { SQLiteConnectionWithLock conn = this.GetConnection(); using (conn.Lock()) { conn.BeginTransaction(); try { action(conn); conn.Commit(); } catch (Exception) { conn.Rollback(); throw; } } })); }
public void OnApplicationSuspended() { Connection.Dispose(); Connection = null; }
public Entry(SQLiteConnectionString connectionString, SQLiteOpenFlags openFlags) { ConnectionString = connectionString; Connection = new SQLiteConnectionWithLock(connectionString, openFlags); }