Table of Contents

Struct SqlParameterBinder

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll

Represents a type-erased parameter binder.

public readonly record struct SqlParameterBinder : IEquatable<SqlParameterBinder>
Implements
Inherited Members
Extension Methods

Constructors

SqlParameterBinder(SqlDialect, Action<IDbCommand, IEnumerable<SqlParameter>>)

Represents a type-erased parameter binder.

public SqlParameterBinder(SqlDialect Dialect, Action<IDbCommand, IEnumerable<SqlParameter>> Delegate)

Parameters

Dialect SqlDialect

SQL dialect with which this query reader is associated.

Delegate Action<IDbCommand, IEnumerable<SqlParameter>>

Underlying delegate.

Properties

Delegate

Underlying delegate.

public Action<IDbCommand, IEnumerable<SqlParameter>> Delegate { get; init; }

Property Value

Action<IDbCommand, IEnumerable<SqlParameter>>

Dialect

SQL dialect with which this query reader is associated.

public SqlDialect Dialect { get; init; }

Property Value

SqlDialect

Methods

Bind(IDbCommand, IEnumerable<SqlParameter>?)

Binds the provided parameter collection to the command or clears all of its Parameters if no parameters have been specified.

public void Bind(IDbCommand command, IEnumerable<SqlParameter>? source = null)

Parameters

command IDbCommand

Command to bind parameters to.

source IEnumerable<SqlParameter>

Optional collection of parameters to bind.