Class MappedDbQueryExtensions
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
Adds parameters to a MappedQuery<T> made from a DbQuery definition.
public static class MappedDbQueryExtensions
- Inheritance
-
MappedDbQueryExtensions
- Inherited Members
Remarks
Each call returns a new query over the command with the parameter added and keeps every option of the
query (the map, SingleResult, AsyncReads, the pool). It applies only to a query that came from
a DbQuery definition; a query over an expressive command takes its parameters on the command,
before Map, and these throw InvalidOperationException for it.
Methods
- AddParam<T>(MappedQuery<T>, string, string?)
Adds a named parameter to the query.
- AddParam<T, TValue>(MappedQuery<T>, string, TValue)
Adds a named parameter to the query.
- AddParam<T, TValue>(MappedQuery<T>, TValue, string?)
Adds a parameter whose name is derived from the argument's expression.
- AddParams<T, TValues>(MappedQuery<T>, TValues)
Adds the members of an object as parameters.