Page Contents

Home > @loopback/repository > EntityCrudRepository > deleteById

EntityCrudRepository.deleteById() method

Delete an entity by id

Signature:

deleteById(id: ID, options?: Options): Promise<void>;

Parameters

Parameter Type Description
id ID Value for the entity id
options Options Options for the operations

Returns:

Promise<void>

A promise that will be resolve if the operation succeeded or will be rejected if the entity was not found.