Page Contents
Home > @loopback/repository > CrudConnector > save
CrudConnector.save() method
Save an entity
Signature:
save?(modelClass: Class<Entity>, entity: EntityData, options?: Options): Promise<EntityData>;
Parameters
Parameter | Type | Description |
---|---|---|
modelClass | Class<Entity> | The model class |
entity | EntityData | The entity instance or data |
options | Options | Options for the operation |
Returns:
Promise<EntityData>
A promise of the entity saved