IdeaBlade DevForce 2010 Help Reference
Count(IQueryable) Method
See Also  Example Send Feedback
IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > QueryableExtensions Class > Count Method : Count(IQueryable) Method



source
Returns the number of elements in a sequence.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Overloads Shared Function Count( _
   ByVal source As IQueryable _
) As Integer
Visual Basic (Usage)Copy Code
Dim source As IQueryable
Dim value As Integer
 
value = QueryableExtensions.Count(source)
C# 
[ExtensionAttribute()]
public static int Count( 
   IQueryable source
)
C++/CLI 
[ExtensionAttribute()]
public:
static int Count( 
   IQueryable^ source
) 

Parameters

source

Example

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

var entityType = typeof(Customer);
var baseQuery = EntityQuery.Create(entityType);
var count = baseQuery.Count();

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.