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

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [bindModel](./repository.bindmodel.md)

## bindModel() function

This is a bridge to the legacy DAO class. The function mixes DAO methods into a model class and attach it to a given data source

<b>Signature:</b>

```typescript
export declare function bindModel<T extends juggler.ModelBaseClass>(modelClass: T, ds: juggler.DataSource): T;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  modelClass | T | Model class |
|  ds | juggler.DataSource | Data source |

<b>Returns:</b>

T

{<!-- -->} The new model class with DAO (CRUD) operations


