Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
transaction const queryRunner = this.dataSource.createQueryRunner(); await queryRunner.connect(); await queryRunner.startTransaction(); // attach query manager with transaction to the request req[ENTITY_MANAGER_KEY] = queryRunner.manager; return next.handle().pipe( // concatMap gets called when