示例#1
0
 /// <summary>
 /// 创建在事务中执行的 SqlServer 数据库查询执行程序
 /// </summary>
 /// <param name="transaction">数据库事务上下文(如果在事务中执行的话)</param>
 public SqlDbExecutor(SqlServerTransactionContext transaction)
 {
     Transaction      = transaction ?? throw new ArgumentNullException(nameof(transaction));
     ConnectionString = Transaction.Connection.ConnectionString;
     Configuration    = Db.DbContext.GetConfiguration <SqlServerConfiguration>();
 }
示例#2
0
 /// <summary>
 /// 创建在事务中执行的 SqlServer 数据库查询执行程序
 /// </summary>
 /// <param name="transaction">数据库事务上下文(如果在事务中执行的话)</param>
 public SqlDbExecutor(SqlServerTransactionContext transaction) : base(transaction)
 {
     Transaction      = transaction ?? throw new ArgumentNullException(nameof(transaction));
     ConnectionString = Transaction.Connection.ConnectionString;
     Configuration    = transaction.ServiceProvider.GetService <SqlServerConfiguration>();
 }