Table of Contents

Struct SqlParameterBinder<TSource>

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

Represents a generic parameter binder.

public readonly record struct SqlParameterBinder<TSource> : IEquatable<SqlParameterBinder<TSource>> where TSource : notnull

Type Parameters

TSource

Parameter source type.

Implements
Inherited Members
Extension Methods

Constructors

SqlParameterBinder(SqlDialect, Action<IDbCommand, TSource>)

Represents a generic parameter binder.

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

Parameters

Dialect SqlDialect

SQL dialect with which this query reader is associated.

Delegate Action<IDbCommand, TSource>

Underlying delegate.

Properties

Delegate

Underlying delegate.

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

Property Value

Action<IDbCommand, TSource>

Dialect

SQL dialect with which this query reader is associated.

public SqlDialect Dialect { get; init; }

Property Value

SqlDialect

Methods

Bind(IDbCommand, TSource?)

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, TSource? source = default)

Parameters

command IDbCommand

Command to bind parameters to.

source TSource

Optional source parameters to bind.