User logic
Let's then implement the CRUD logic, but now following Prisma's pattern.
First, let's inject a PrismaService
in the UsersService
, which will give us an interface for interacting with the database, much like TypeORM's Repository
.
Now, we shall implement each one of the methods. Note that the interface offered by Prisma is very intuitive and succint. Instead of needing a repository
for each entity, prisma
simply accesses the desired entity and then the operation.
Commit - Implementing user logic
Last updated