EntityQueryable.Select<TEntity> Method
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Applies the specified selection to the source query.
Namespace: System.ServiceModel.DomainServices.Client
Assembly: System.ServiceModel.DomainServices.Client (in System.ServiceModel.DomainServices.Client.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Select(Of TEntity As Entity) ( _
source As EntityQuery(Of TEntity), _
selector As Expression(Of Func(Of TEntity, TEntity)) _
) As EntityQuery(Of TEntity)
'Usage
Dim source As EntityQuery(Of TEntity)
Dim selector As Expression(Of Func(Of TEntity, TEntity))
Dim returnValue As EntityQuery(Of TEntity)
returnValue = source.Select(selector)
public static EntityQuery<TEntity> Select<TEntity>(
this EntityQuery<TEntity> source,
Expression<Func<TEntity, TEntity>> selector
)
where TEntity : Entity
[ExtensionAttribute]
public:
generic<typename TEntity>
where TEntity : Entity
static EntityQuery<TEntity>^ Select(
EntityQuery<TEntity>^ source,
Expression<Func<TEntity, TEntity>^>^ selector
)
static member Select :
source:EntityQuery<'TEntity> *
selector:Expression<Func<'TEntity, 'TEntity>> -> EntityQuery<'TEntity> when 'TEntity : Entity
JScript does not support generic types and methods.
Type Parameters
- TEntity
The entity type being queried.
Parameters
- source
Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
The source query.
- selector
Type: System.Linq.Expressions.Expression<Func<TEntity, TEntity>>
The selector function. Note that projections are not supported. The selection must be the entity itself.
Return Value
Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
A EntityQuery<TEntity> with the specified selection.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type EntityQuery<TEntity>. When you use instance method syntax to call this method, omit the first parameter. For more information, see or .
Remarks
Only empty selections are supported.