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
TSourceParameter source type.
- Implements
-
IEquatable<SqlParameterBinder<TSource>>
- Inherited Members
- Extension Methods
Constructors
SqlParameterBinder(SqlDialect, Action<IDbCommand, TSource>)
Represents a generic parameter binder.
public SqlParameterBinder(SqlDialect Dialect, Action<IDbCommand, TSource> Delegate)
Parameters
DialectSqlDialectSQL dialect with which this query reader is associated.
DelegateAction<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
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
commandIDbCommandCommand to bind parameters to.
sourceTSourceOptional source parameters to bind.