---
lang: en
title: 'API docs: repository-tests.crudrepositoryctor'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository-tests
permalink: /doc/en/lb4/apidocs.repository-tests.crudrepositoryctor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository-tests](./repository-tests.md) &gt; [CrudRepositoryCtor](./repository-tests.crudrepositoryctor.md)

## CrudRepositoryCtor type

A constructor of a class implementing CrudRepository interface, accepting the Entity class (constructor) and a dataSource instance.

<b>Signature:</b>

```typescript
export declare type CrudRepositoryCtor = new <T extends Entity, ID, Relations extends object>(entityClass: typeof Entity & {
    prototype: T;
}, dataSource: juggler.DataSource) => EntityCrudRepository<T, ID, Relations>;
```
<b>References:</b> [Entity](./repository.entity.md)<!-- -->, [EntityCrudRepository](./repository.entitycrudrepository.md)


