---
lang: en
title: 'API docs: repository.entitycrudrepository.exists'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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 | <code>ID</code> | Value for the entity id |
|  options | <code>Options</code> | Options for the operations |

<b>Returns:</b>

`Promise<boolean>`

Promise<true> if an entity exists for the id, otherwise Promise<false>


