Share via


ObjectQuery<T>.SelectValue<TResultType> Method

Definition

Limits the query results to only the property specified in the projection.

public System.Data.Entity.Core.Objects.ObjectQuery<TResultType> SelectValue<TResultType> (string projection, params System.Data.Entity.Core.Objects.ObjectParameter[] parameters);
member this.SelectValue : string * System.Data.Entity.Core.Objects.ObjectParameter[] -> System.Data.Entity.Core.Objects.ObjectQuery<'ResultType>
Public Function SelectValue(Of TResultType) (projection As String, ParamArray parameters As ObjectParameter()) As ObjectQuery(Of TResultType)

Type Parameters

TResultType

The type of the ObjectQuery<T> returned by the SelectValue<TResultType>(String, ObjectParameter[]) method.

Parameters

projection
String

The projection list.

parameters
ObjectParameter[]

An optional set of query parameters that should be in scope when parsing.

Returns

ObjectQuery<TResultType>

A new ObjectQuery<T> instance of a type compatible with the specific projection. The returned ObjectQuery<T> is equivalent to the original instance with SELECT VALUE applied.

Exceptions

projection is null or parameters is null.

The projection is an empty string.

Applies to