Page Contents
Home > @loopback/repository > CrudConnector > deleteById
CrudConnector.deleteById() method
Delete an entity by id
Signature:
deleteById?<IdType>(modelClass: Class<Entity>, id: IdType, options?: Options): Promise<boolean>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| modelClass | Class<Entity> | The model class |
| id | IdType | The entity id value |
| options | Options | Options for the operation |
Returns:
Promise<boolean>
Promise