EntityQueryable.Where<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 filter 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 Where(Of TEntity As Entity) ( _
source As EntityQuery(Of TEntity), _
predicate As Expression(Of Func(Of TEntity, Boolean)) _
) As EntityQuery(Of TEntity)
'Usage
Dim source As EntityQuery(Of TEntity)
Dim predicate As Expression(Of Func(Of TEntity, Boolean))
Dim returnValue As EntityQuery(Of TEntity)
returnValue = source.Where(predicate)
public static EntityQuery<TEntity> Where<TEntity>(
this EntityQuery<TEntity> source,
Expression<Func<TEntity, bool>> predicate
)
where TEntity : Entity
[ExtensionAttribute]
public:
generic<typename TEntity>
where TEntity : Entity
static EntityQuery<TEntity>^ Where(
EntityQuery<TEntity>^ source,
Expression<Func<TEntity, bool>^>^ predicate
)
static member Where :
source:EntityQuery<'TEntity> *
predicate:Expression<Func<'TEntity, bool>> -> 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.
- predicate
Type: System.Linq.Expressions.Expression<Func<TEntity, Boolean>>
The filter predicate.
Return Value
Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
A EntityQuery<TEntity> with the specified filter.
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 .