Table of Contents

Method AddParam

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

AddParam<TValue>(string, TValue)

Adds a named parameter before the source is known.

public UnboundCall<T> AddParam<TValue>(string name, TValue value)

Parameters

name string

The name of the parameter, with or without its prefix.

value TValue

The value.

Returns

UnboundCall<T>

The parameters so far, to be given a source with Using.

Type Parameters

TValue

The type of the value.

Remarks

For fewer allocations, declare the values with Params<TParams>() and a readonly record struct.

Exceptions

ArgumentNullException

name is null.

AddParam(string, string?)

Adds a named parameter before the source is known.

public UnboundCall<T> AddParam(string name, string? value)

Parameters

name string

The name of the parameter, with or without its prefix.

value string

The value.

Returns

UnboundCall<T>

The parameters so far, to be given a source with Using.

Remarks

For fewer allocations, declare the values with Params<TParams>() and a readonly record struct.

Exceptions

ArgumentNullException

name is null.

AddParam<TValue>(TValue, string?)

Adds a parameter whose name is derived from the argument's expression, before the source is known.

public UnboundCall<T> AddParam<TValue>(TValue value, string? expression = null)

Parameters

value TValue

The value.

expression string

The text of the argument, filled in by the compiler.

Returns

UnboundCall<T>

The parameters so far, to be given a source with Using.

Type Parameters

TValue

The type of the value.

Exceptions

ArgumentException

A name cannot be derived from the argument.