/// <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;
     }
 }
 /// <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;
     }
 }
示例#3
0
 /// <summary>
 /// commit the transaction
 /// </summary>
 public void Commit()
 {
     Trans?.Commit();
     Dispose();
 }
示例#4
0
 /// <summary>
 /// 提交
 /// </summary>
 public void Commit()
 {
     Trans.Commit();
     isCommitOrRollback = true;
     Close();
 }
示例#5
0
 /// <summary>
 ///     提交一个事务
 /// </summary>
 public void CommitTrans()
 {
     Trans.Commit();
     TransStats = 3;
 }