Returns the number of entities based on the supplied Query.

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

Syntax

C#
public override long Count(
	Query query
)
Visual Basic (Declaration)
Public Overrides Function Count ( _
	query As Query _
) As Long

Return Value

The number of entities.

Implements

IUnitOfWork..::.Count<(Of <(TEntity>)>)(Query)
IUnitOfWork..::.Count<(Of <(TEntity>)>)(Query)

Examples

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

See Also