示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="querySession"></param>
 /// <param name="isolationLevel"></param>
 public TransactionScope(IQuerySession querySession, IsolationLevel isolationLevel = IsolationLevel.Unspecified)
 {
     if (null == transaction)
     {
         connection = querySession.CreateConnection();
         connection.Open();
         DbTransaction dbTransaction = connection.BeginTransaction(isolationLevel);
         Transaction.Current = new CommittableTransaction(dbTransaction);
     }
     else
     {
         Transaction.Current = transaction.DependentClone();
     }
 }