EntityQueryable.Take<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 take clause 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 Take(Of TEntity As Entity) ( _
source As EntityQuery(Of TEntity), _
count As Integer _
) As EntityQuery(Of TEntity)
'Usage
Dim source As EntityQuery(Of TEntity)
Dim count As Integer
Dim returnValue As EntityQuery(Of TEntity)
returnValue = source.Take(count)
public static EntityQuery<TEntity> Take<TEntity>(
this EntityQuery<TEntity> source,
int count
)
where TEntity : Entity
[ExtensionAttribute]
public:
generic<typename TEntity>
where TEntity : Entity
static EntityQuery<TEntity>^ Take(
EntityQuery<TEntity>^ source,
int count
)
static member Take :
source:EntityQuery<'TEntity> *
count:int -> 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.
- count
Type: System.Int32
The number to take.
Return Value
Type: System.ServiceModel.DomainServices.Client.EntityQuery<TEntity>
A EntityQuery<TEntity> with the specified take clause.
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 .