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