Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
If we get no exceptions, we commit the transaction which persists all the writes into the DB. If any exception was thrown, we will rollback so that all the write operations are reverted and that failed API call will not modify anything in the DB. So the rule is any time you have to execute multiple