示例#1
0
        /// <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;
        }
示例#2
0
 /// <summary>
 /// 从现有的 SQL Server 数据库配置中创建一个数据库配置
 /// </summary>
 /// <param name="configuration">现有的数据库配置</param>
 public SqlDbConfiguration(SqlDbConfiguration configuration) : base(configuration)
 {
 }
示例#3
0
 public SqlDbExecutorWithTransaction(SqlDbTransactionContext transaction, SqlDbConfiguration configuration)
     : base(transaction.Connection.ConnectionString, configuration)
 {
     TransactionContext = transaction;
 }
示例#4
0
 internal SqlDbTransactionContext(string connectionString, SqlDbConfiguration configuration)
 {
     Connection = new MySqlConnection(connectionString);
     _executor  = new SqlDbExecutorWithTransaction(this, configuration);
 }