@loopback/docs
Version:
Documentation for LoopBack 4
38 lines (24 loc) • 1.01 kB
Markdown
---
lang: en
title: 'API docs: repository.crudconnector.create'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.crudconnector.create.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [CrudConnector](./repository.crudconnector.md) > [create](./repository.crudconnector.create.md)
## CrudConnector.create() method
Create a new entity
<b>Signature:</b>
```typescript
create(modelClass: Class<Entity>, entity: EntityData, options?: Options): Promise<EntityData>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| modelClass | <code>Class<Entity></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 created