---
lang: en
title: 'API docs: repository.entitycrudrepository'
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.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> 
```
<b>Extends:</b> [EntityRepository](./repository.entityrepository.md)<!-- -->&lt;T, ID&gt;, [CrudRepository](./repository.crudrepository.md)<!-- -->&lt;T, Relations&gt;

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [entityClass](./repository.entitycrudrepository.entityclass.md) | typeof [Entity](./repository.entity.md) &amp; { prototype: T; } |  |
|  [inclusionResolvers](./repository.entitycrudrepository.inclusionresolvers.md) | Map&lt;string, [InclusionResolver](./repository.inclusionresolver.md)<!-- -->&lt;T, [Entity](./repository.entity.md)<!-- -->&gt;&gt; |  |

## 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 |


