TSource
IdeaBlade DevForce 2010 Help Reference
Take<TSource>(IEntityQuery<TSource>,Int32) Method
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > Take Method : Take<TSource>(IEntityQuery<TSource>,Int32) Method



source
count
Returns a specified number of contiguous elements from the start of a sequence.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Overloads Shared Function Take(Of TSource)( _
   ByVal source As IEntityQuery(Of TSource), _
   ByVal count As Integer _
) As IEntityQuery(Of TSource)
Visual Basic (Usage)Copy Code
Dim source As IEntityQuery(Of TSource)
Dim count As Integer
Dim value As IEntityQuery(Of TSource)
 
value = EntityQueryExtensions.Take(Of TSource)(source, count)
C++/CLI 
[ExtensionAttribute()]
public:
static IEntityQuery<TSource^>^ Takegeneric<typename TSource>
( 
   IEntityQuery<TSource^>^ source,
   int count
) 

Parameters

source
count

Type Parameters

TSource

Example

C#Copy Code
var mgr = new DomainModelEntityManager();

var query = mgr.Customers.OrderBy(c=> c.Id).Skip(10).Take(10);
var results = query.Execute();

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.