---
lang: en
title: 'API docs: repository.crudrepositoryimpl._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.crudrepositoryimpl._constructor_.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [CrudRepositoryImpl](./repository.crudrepositoryimpl.md) &gt; [(constructor)](./repository.crudrepositoryimpl._constructor_.md)

## CrudRepositoryImpl.(constructor)

Constructs a new instance of the `CrudRepositoryImpl` class

**Signature:**

```typescript
constructor(dataSource: DataSource, entityClass: typeof Entity & {
        prototype: T;
    });
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  dataSource | [DataSource](./repository.datasource.md) |  |
|  entityClass | typeof [Entity](./repository.entity.md) &amp; { prototype: T; } |  |


