Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
private itemRepository: Repository<Item> ) {} @Post() async routeHandler() { // then make queries await this.orderRepository.save({ /* order data */ }); await this.itemRepository.save({ /* Item data */ }); // ... } However, as we mentioned before, this is a bad approach and we need to wrap these