ObjectQuery<T>.SelectValue<TResultType> Method (String, ObjectParameter[])

 

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

Namespace:   System.Data.Entity.Core.Objects
Assembly:  EntityFramework (in EntityFramework.dll)

public ObjectQuery<TResultType> SelectValue<TResultType>(
	string projection,
	params ObjectParameter[] parameters
)

Parameters

projection
Type: System.String

The projection list.

parameters
Type: System.Data.Entity.Core.Objects.ObjectParameter[]

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

Return Value

Type: System.Data.Entity.Core.Objects.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.

Type Parameters

TResultType

The type of the ObjectQuery<T> returned by the SelectValue<TResultType> method.

Exception Condition
ArgumentNullException

projection is null or parameters is null.

ArgumentException

The projection is an empty string.