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
-
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
Dialect
SqlDialectSQL 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
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
IDbCommandCommand to bind parameters to.
source
TSourceOptional source parameters to bind.