---
lang: en
title: 'API docs: repository.entitycrudrepository'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.entitycrudrepository.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)

## EntityCrudRepository interface

CRUD operations for a repository of entities

<b>Signature:</b>

```typescript
export interface EntityCrudRepository<T extends Entity, ID, Relations extends object = {}> extends EntityRepository<T, ID>, CrudRepository<T, Relations> 
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [entityClass](./repository.entitycrudrepository.entityclass.md) | <code>typeof Entity &amp; {</code><br/><code>        prototype: T;</code><br/><code>    }</code> |  |

## Methods

|  Method | Description |
|  --- | --- |
|  [delete(entity, options)](./repository.entitycrudrepository.delete.md) | Delete an entity |
|  [deleteById(id, options)](./repository.entitycrudrepository.deletebyid.md) | Delete an entity by id |
|  [exists(id, options)](./repository.entitycrudrepository.exists.md) | Check if an entity exists for the given id |
|  [findById(id, filter, options)](./repository.entitycrudrepository.findbyid.md) | Find an entity by id, return a rejected promise if not found. |
|  [replaceById(id, data, options)](./repository.entitycrudrepository.replacebyid.md) | Replace an entity by id |
|  [save(entity, options)](./repository.entitycrudrepository.save.md) | Save an entity. If no id is present, create a new entity |
|  [update(entity, options)](./repository.entitycrudrepository.update.md) | Update an entity |
|  [updateById(id, data, options)](./repository.entitycrudrepository.updatebyid.md) | Update an entity by id with property/value pairs in the data object |


