UNPKG

@loopback/docs

Version:
37 lines (23 loc) 951 B
--- lang: en title: 'API docs: repository.bindmodel' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar 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