Ejemplo n.º 1
0
        public KMTransaction BeginTransaction(IsolationLevel isolationLevel)
        {
            if (transaction == null)
            {
                this.transaction = new KMTransaction(this, this.Database.BeginTransaction(isolationLevel));
            }

            return(this.transaction);
        }
Ejemplo n.º 2
0
        public KMTransaction BeginTransaction()
        {
            if (transaction == null)
            {
                this.transaction = new KMTransaction(this, this.Database.BeginTransaction());
            }

            return(this.transaction);
        }
Ejemplo n.º 3
0
 public void Commit()
 {
     if (this.tran != null)
     {
         this.tran.Commit();
         if (this.db != null)
         {
             this.db.transaction = null;
         }
         this.tran = null;
         this.db   = null;
     }
     current = null;
 }
Ejemplo n.º 4
0
 public void Rollback()
 {
     if (this.tran != null)
     {
         this.tran.Rollback();
         if (this.db != null)
         {
             this.db.transaction = null;
         }
         this.tran = null;
         this.db   = null;
     }
     current = null;
 }
Ejemplo n.º 5
0
 internal KMTransaction(DBEntities db, DbContextTransaction tran)
 {
     this.db   = db;
     this.tran = tran;
     current   = this;
 }