Returns the number of entities based on the supplied Query.

Namespace:  Mindscape.LightSpeed
Assembly:  Mindscape.LightSpeed (in Mindscape.LightSpeed.dll)
Version: 4.0.0.0 (4.0.0.0)

Syntax

C#
long Count(
	Query query
)
Visual Basic (Declaration)
Function Count ( _
	query As Query _
) As Long

Return Value

The number of entities.

Examples

CopyC#
Query query = new Query(typeof(Product), Entity.Attribute("Price") > 1000000);
long expensiveProductCount = unitOfWork.Count(query);

See Also