@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
34 lines (23 loc) • 1.11 kB
Markdown
lang: en
title: 'API docs: repository.defaultkeyvaluerepository._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.defaultkeyvaluerepository._constructor_.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [DefaultKeyValueRepository](./repository.defaultkeyvaluerepository.md) > [(constructor)](./repository.defaultkeyvaluerepository._constructor_.md)
## DefaultKeyValueRepository.(constructor)
Construct a KeyValueRepository with a legacy DataSource
<b>Signature:</b>
```typescript
constructor(entityClass: typeof Model & {
prototype: T;
}, ds: juggler.DataSource);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| entityClass | typeof [Model](./repository.model.md) & { prototype: T; } | |
| ds | juggler.DataSource | Legacy DataSource |