---
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) &gt; [@loopback/repository](./repository.md) &gt; [DefaultCrudRepository](./repository.defaultcrudrepository.md) &gt; [(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) &amp; { prototype: T; } | LoopBack 4 entity class |
|  dataSource | juggler.DataSource | Legacy juggler data source |


