Method AddParams
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
AddParams<T, TValues>(MappedQuery<T>, TValues)
Adds the members of an object as parameters.
public static MappedQuery<T> AddParams<T, TValues>(this MappedQuery<T> query, TValues values) where TValues : notnull
Parameters
queryMappedQuery<T>The query, made from a DbQuery definition: by
Usingon a MappedDbQuery<T>, or after an earlierAddParam.valuesTValuesThe object whose members are the parameters.
Returns
- MappedQuery<T>
A new query with the parameters;
queryis not changed.
Type Parameters
TThe type each row is mapped to.
TValuesThe type of the object.
Exceptions
- InvalidOperationException
querywas not made from a DbQuery definition.