@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
34 lines (23 loc) • 1.12 kB
Markdown
lang: en
title: 'API docs: repository.defaultcrudrepository._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.defaultcrudrepository._constructor_.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [DefaultCrudRepository](./repository.defaultcrudrepository.md) > [(constructor)](./repository.defaultcrudrepository._constructor_.md)
## DefaultCrudRepository.(constructor)
Constructor of DefaultCrudRepository
<b>Signature:</b>
```typescript
constructor(entityClass: typeof Entity & {
prototype: T;
}, dataSource: juggler.DataSource);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| entityClass | typeof [Entity](./repository.entity.md) & { prototype: T; } | LoopBack 4 entity class |
| dataSource | juggler.DataSource | Legacy juggler data source |