示例#1
0
 public ThreadSafeTransactionContext
     (DisposableThreadLocal <IDbConnection> connection, IDbTransaction transaction)
 {
     this.Connection  = connection;
     this.Transaction = transaction;
 }
示例#2
0
 public DisposableThreadLocal <IDbConnection> ConnectAsThreadSafe()
 => DisposableThreadLocal.Create(() => this.Connect());
示例#3
0
 public Task ReplaceRangeAsync(IEnumerable <TRecord> items,
                               DisposableThreadLocal <IDbConnection> connection, IDbTransaction transaction)
 => this.AddMainAsync(items, connection.Value, transaction, true);