https://github.com/zhuravlevma/prisma-unit-of-work
DDD, Unit of work pattern for Typescript, Nest.js, Prisma ⚡
https://github.com/zhuravlevma/prisma-unit-of-work
async-local-storage ddd ddd-patterns example javascript nest nestjs orm prisma prisma-client prisma-orm typescript unit-of-work unit-of-work-pattern
Last synced: 9 months ago
JSON representation
DDD, Unit of work pattern for Typescript, Nest.js, Prisma ⚡
- Host: GitHub
- URL: https://github.com/zhuravlevma/prisma-unit-of-work
- Owner: zhuravlevma
- License: mit
- Created: 2023-07-29T08:40:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T16:19:54.000Z (about 1 year ago)
- Last Synced: 2025-03-26T03:51:19.636Z (10 months ago)
- Topics: async-local-storage, ddd, ddd-patterns, example, javascript, nest, nestjs, orm, prisma, prisma-client, prisma-orm, typescript, unit-of-work, unit-of-work-pattern
- Language: TypeScript
- Homepage:
- Size: 747 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unit of work pattern for PrismaORM
```typescript
return this.unitOfWork.runInTransaction(async (tx) => {
const updatedAggregate1 = await this.repo.saveAggregate1(entity, { tx });
await this.repo2.saveAggregate2(entity, { tx });
return updatedAggregate1;
});
```
