Table of Contents

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

query MappedQuery<T>

The query, made from a DbQuery definition: by Using on a MappedDbQuery<T>, or after an earlier AddParam.

values TValues

The object whose members are the parameters.

Returns

MappedQuery<T>

A new query with the parameters; query is not changed.

Type Parameters

T

The type each row is mapped to.

TValues

The type of the object.

Exceptions

InvalidOperationException

query was not made from a DbQuery definition.