/// <inheritdoc cref="ToCommand(DbProviderFactory)" /// select="*[not(self::param/@name='providerFactory') and not(self::seealso)]"/> /// <param name="connection">The connection used to create the command.</param> /// <seealso cref="Extensions.CreateCommand(DbConnection, string, object[])"/> public DbCommand ToCommand(DbConnection connection) { return(Extensions.CreateCommand(connection, this)); }
/// <summary> /// Creates and returns a <see cref="DbCommand"/> object whose <see cref="DbCommand.CommandText"/> property /// is initialized with the SQL representation of this instance, and whose <see cref="DbCommand.Parameters"/> /// property is initialized with the values from <see cref="SqlBuilder.ParameterValues"/> of this instance. /// </summary> /// <param name="providerFactory">The provider factory used to create the command.</param> /// <returns> /// A new <see cref="DbCommand"/> object whose <see cref="DbCommand.CommandText"/> property /// is initialized with the SQL representation of this instance, and whose <see cref="DbCommand.Parameters"/> /// property is initialized with the values from <see cref="SqlBuilder.ParameterValues"/> of this instance. /// </returns> /// <seealso cref="Extensions.CreateCommand(DbProviderFactory, string, object[])"/> public DbCommand ToCommand(DbProviderFactory providerFactory) { return(Extensions.CreateCommand(providerFactory, this)); }