---
lang: en
title: 'API docs: repository.bindmodel'
keywords: LoopBack 4.0, LoopBack 4
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 | <code>T</code> | Model class |
|  ds | <code>juggler.DataSource</code> | Data source |

<b>Returns:</b>

`T`

{<!-- -->} The new model class with DAO (CRUD) operations


