22 namespace Deveel.Data.Client {
29 if (connection == null)
30 throw new ArgumentNullException(
"connection");
32 this.connection = connection;
34 this.isolationLevel = isolationLevel;
40 throw new InvalidOperationException(
"The transaction was already finished.");
45 if (connection == null ||
46 (connection.
State != ConnectionState.Open &&
47 connection.
State != ConnectionState.Executing))
48 throw new InvalidOperationException(
"The underlying connection must be opened.");
53 Connection.CommitTransaction(CommitId);
55 Connection.Transaction = null;
61 if (connection == null ||
62 (connection.
State != ConnectionState.Open &&
63 connection.
State != ConnectionState.Executing))
64 throw new InvalidOperationException(
"The underlying connection must be opened.");
69 Connection.RollbackTransaction(CommitId);
71 Connection.Transaction = null;
77 get {
return connection; }
80 protected override DbConnection DbConnection {
81 get {
return Connection; }
85 get {
return isolationLevel; }
88 internal int CommitId {
get;
private set; }
90 protected override void Dispose(
bool disposing) {
DeveelDbConnection connection
override ConnectionState State
override void Dispose(bool disposing)
override void Dispose(bool disposing)
IsolationLevel isolationLevel
DeveelDbTransaction Transaction
DeveelDbTransaction(DeveelDbConnection connection, IsolationLevel isolationLevel, int commitId)