Class SqlParameters
- Namespace
- SqlBound
- Assembly
- SqlBound.dll
An immutable, named set of SQL parameter values. Null values are normalized to DBNull so callers can bind them to an ADO.NET parameter without a separate null check.
public sealed class SqlParameters
- Inheritance
-
SqlParameters
- Inherited Members
Constructors
SqlParameters(params (string Name, object? Value)[])
Initializes a new instance with the given named parameter values. Names must be non-empty and unique.
public SqlParameters(params (string Name, object? Value)[] parameters)
Parameters
Exceptions
- ArgumentException
A parameter name is null, empty, whitespace, or duplicated.
Properties
Count
The number of parameters in this set.
public int Count { get; }
Property Value
Empty
An empty parameter set.
public static SqlParameters Empty { get; }
Property Value
Items
The parameters, in the order they were given. Values are never null; a null value provided at construction is normalized to Value.
public IReadOnlyList<KeyValuePair<string, object>> Items { get; }