UNPKG

@loopback/docs

Version:
38 lines (24 loc) 990 B
--- lang: en title: 'API docs: repository.crudconnector.save' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.repository.crudconnector.save.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [CrudConnector](./repository.crudconnector.md) &gt; [save](./repository.crudconnector.save.md) ## CrudConnector.save() method Save an entity <b>Signature:</b> ```typescript save?(modelClass: Class<Entity>, entity: EntityData, options?: Options): Promise<EntityData>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | modelClass | <code>Class&lt;Entity&gt;</code> | The model class | | entity | <code>EntityData</code> | The entity instance or data | | options | <code>Options</code> | Options for the operation | <b>Returns:</b> `Promise<EntityData>` A promise of the entity saved