Method Params
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Params<TParams>()
Declares the type of the values: a struct (a readonly record struct is the intended shape) whose public properties and fields are the parameters.
public ScalarDbQuery<TParams, T> Params<TParams>() where TParams : struct, IEquatable<TParams>
Returns
- ScalarDbQuery<TParams, T>
The typed definition.
Type Parameters
TParamsThe type of the values.
Remarks
The values are then given in one call, which the compiler checks:
.Using(db).AddParams(new(AuthorId: authorId, Day: day)).
A class object that already exists (for example a deserialized request) is added with AddParams on the untyped definition.