Page Contents

Home > @loopback/repository > CrudRepository > create

CrudRepository.create() method

Create a new record

Signature:

create(dataObject: DataObject<T>, options?: Options): Promise<T>;

Parameters

Parameter Type Description
dataObject DataObject<T> The data to be created
options Options (Optional) Options for the operations

Returns:

Promise<T>

A promise of record created