Ejemplo n.º 1
0
 /// <summary>
 /// commit the transaction
 /// </summary>
 public void SaveChanges()
 {
     try
     {
         Trans?.Commit();
     }
     catch
     {
         Rollback();
         throw;
     }
     finally
     {
         OpenedDataReaders.Clear();
         Trans?.Dispose();
         SqlConnection?.Dispose();
         Trans         = null;
         SqlConnection = null;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// commit the transaction
 /// </summary>
 public void SaveChanges()
 {
     try
     {
         Trans?.Commit();
     }
     catch (Exception ex)
     {
         Rollback();
         throw new EntityException(ex.Message);
     }
     finally
     {
         OpenedDataReaders.Clear();
         Trans?.Dispose();
         SqlConnection?.Dispose();
         Trans         = null;
         SqlConnection = null;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// commit the transaction
 /// </summary>
 public void Commit()
 {
     Trans?.Commit();
     Dispose();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 提交
 /// </summary>
 public void Commit()
 {
     Trans.Commit();
     isCommitOrRollback = true;
     Close();
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     提交一个事务
 /// </summary>
 public void CommitTrans()
 {
     Trans.Commit();
     TransStats = 3;
 }