Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 386 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 386 Bytes

Unit of work pattern for PrismaORM

return this.unitOfWork.runInTransaction(async (tx) => {
  const updatedAggregate1 = await this.repo.saveAggregate1(entity, { tx });
  await this.repo2.saveAggregate2(entity, { tx });
  return updatedAggregate1;
});

image