Пример #1
0
 public void Dispose()
 {
     if (this.db != null)
     {
         this.db.Close();
         this.db = null;
     }
 }
Пример #2
0
 /// <summary>
 /// 回滚事务
 /// </summary>
 public void Rollback()
 {
     current = null;
     if (this.db != null && !this.db.IsDisposed)
     {
         this.db.Rollback();
         this.db = null;
     }
 }
Пример #3
0
 /// <summary>
 /// 提交事务
 /// </summary>
 public void Commit()
 {
     current = null;
     if (this.db != null && !this.db.IsDisposed)
     {
         this.db.Commit();
         this.db = null;
     }
 }
Пример #4
0
 internal void Clear()
 {
     current = null;
     this.db = null;
 }
Пример #5
0
 internal AfxTransaction(AfxDapper db)
 {
     this.db = db;
     current = this;
 }
Пример #6
0
 public CloseConnection(AfxDapper db)
 {
     this.db = db;
 }