Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// app.service.ts
@Transaction()
async makeRemittanceWithTypeOrmV2(fromId: number, toId: number, sum: number, withError: boolean, @TransactionManager() transactionEntityManager: EntityManager = null) {
// ...
await this.appServiceV2.savePurseInTransactionV2(fromPurse, transactionEntityManager);
// ...
}
// app.service-v2.ts
// ..
async savePurseInTransactionV2(purse: Purse, transactionManager: EntityManager) {
await transactionManager.save(Purse, purse);
}
// ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment