public new SqliteTransaction BeginTransaction()
{
return (SqliteTransaction)BeginDbTransaction(_defaultIsolation);
}
SqliteConnection::BeginTransaction ( IsolationLevel isolationLevel ) : |
|
SqliteConnection::BeginTransaction ( IsolationLevel isolationLevel, bool deferredLock ) : |
|
SqliteConnection::BeginTransaction ( bool deferredLock ) : |
public void UpdateAllScores(List <Score> scores) { Mono.Data.Sqlite.SqliteConnection conn = null; Mono.Data.Sqlite.SqliteTransaction trans = null; try { conn = openDbConnection(); trans = conn.BeginTransaction(); var command = conn.CreateCommand(); command.Transaction = trans; command.CommandText = "DELETE FROM [Score]"; command.ExecuteNonQuery(); command.Dispose(); foreach (var score in scores) { this.addScore(conn, trans, score); } trans.Commit(); } catch (Exception exc) { trans.Rollback(); throw exc; } finally { if (conn != null) { conn.Close(); } } }