IdeaBlade.Linq Assembly > IdeaBlade.Linq Namespace > QueryableExtensions Class > Count Method : Count(IQueryable,IPredicateDescription) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function Count( _ ByVal source As IQueryable, _ ByVal predicateDescription As IPredicateDescription _ ) As Integer
'Usage
Dim source As IQueryable Dim predicateDescription As IPredicateDescription Dim value As Integer value = QueryableExtensions.Count(source, predicateDescription)
[Extension()] public static int Count( IQueryable source, IPredicateDescription predicateDescription )
var mgr1 = new DomainModelEntityManager(); var entityType = typeof(Customer); var baseQuery = EntityQuery.Create(entityType); var pd = new PredicateDescription(Customer.EntityPropertyNames.Country, FilterOperator.IsEqualTo, "UK"); var count = baseQuery.Count(pd);
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2