Created
February 11, 2021 18:25
-
-
Save alphamikle/5bf1b184c6c0984a52c8fc5b56537122 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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