UNPKG

@loopback/docs

Version:

Documentation files rendered at [https://loopback.io](https://loopback.io)

38 lines (24 loc) 1.1 kB
--- lang: en title: 'API docs: repository.entitycrudrepository.exists' keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI sidebar: lb4_sidebar editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository permalink: /doc/en/lb4/apidocs.repository.entitycrudrepository.exists.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [EntityCrudRepository](./repository.entitycrudrepository.md) &gt; [exists](./repository.entitycrudrepository.exists.md) ## EntityCrudRepository.exists() method Check if an entity exists for the given id <b>Signature:</b> ```typescript exists(id: ID, options?: Options): Promise<boolean>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | id | ID | Value for the entity id | | options | [Options](./repository.options.md) | Options for the operations | <b>Returns:</b> Promise&lt;boolean&gt; Promise<true> if an entity exists for the id, otherwise Promise<false>