Page Contents
Home > @loopback/repository > CrudConnector > count
CrudConnector.count() method
Count matching entities
Signature:
count(modelClass: Class<Entity>, where?: Where<Entity>, options?: Options): Promise<Count>;
Parameters
Parameter | Type | Description |
---|---|---|
modelClass | Class<Entity> | The model class |
where | Where<Entity> | The matching criteria |
options | Options | Options for the operation |
Returns:
Promise<Count>
A promise of number of matching entities