Exemplo n.º 1
0
 /// <summary>
 /// 使用已有的辅助类初始化 <see cref="Py.Sql.SqlHelper"/> 的新实例,新实例和参数使用同一个连接。
 /// </summary>
 /// <param name="helper">The helper。</param>
 /// <exception cref="ArgumentNullException"><paramref name="helper" /> 为空。</exception>
 /// <exception cref="ArgumentException">传递的辅助类和当前实例的类型不相同。</exception>
 public MySqlHelper(DbHelper helper)
 {
     Thrower.ThrowArgumentNullExceptionIf(helper, "helper");
     _connection = helper.Connection as MySqlConnection;
     Thrower.ThrowArgumentExceptionIf(_connection == null, "连接空");
 }