T
IdeaBlade DevForce 2010 Help Reference
Count<T>(IEntityQuery<T>) Method
See Also  Example Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > Count Method : Count<T>(IEntityQuery<T>) Method



source
Returns the number of elements in a sequence.

Syntax

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

Parameters

source

Type Parameters

T

Example

C#Copy Code
var mgr1 = new DomainModelEntityManager();
var ct = mgr1.Customers.Where(c=> c.Country == "UK").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.