Click in order · NestJS course · Module 3: TypeORM and Databases
The save method in a repository
Arrange the elements of saving a new entity via a repository:
Items to click
- return legionary;
- async create(dto: CreateDto) {
- await this.repo.save(legionary);
- const legionary = this.repo.create(dto);
You can check the correct answer by solving this task in the CodeWorlds game.