/// <summary> /// 创建 SqlServer 数据库查询执行程序 /// </summary> /// <param name="connectionString">连接字符串</param> /// <param name="configuration">当前要使用的数据库配置信息</param> public SqlDbExecutor(string connectionString, SqlDbConfiguration configuration) : base(configuration) { if (connectionString == null) { throw new ArgumentNullException("connectionString"); } if (configuration == null) { throw new ArgumentNullException("configuration"); } ConnectionString = connectionString; Configuration = configuration; }
/// <summary> /// 从现有的 SQL Server 数据库配置中创建一个数据库配置 /// </summary> /// <param name="configuration">现有的数据库配置</param> public SqlDbConfiguration(SqlDbConfiguration configuration) : base(configuration) { }
public SqlDbExecutorWithTransaction(SqlDbTransactionContext transaction, SqlDbConfiguration configuration) : base(transaction.Connection.ConnectionString, configuration) { TransactionContext = transaction; }
internal SqlDbTransactionContext(string connectionString, SqlDbConfiguration configuration) { Connection = new MySqlConnection(connectionString); _executor = new SqlDbExecutorWithTransaction(this, configuration); }