1. 3
    Create an entry in the database with Prisma Client
    2m 4s

Create an entry in the database with Prisma Client

InstructorXiaoru Li

Share this video with your friends

Send Tweet

In this lesson, we will write a code snippet which creates a new entry in the database. We will import and use the Prisma Client that we previously generated by running the command npx prisma generate to perform this query.

Thanks to type-safety, we can now directly catch mismatched data field types while we are coding, drastically reducing the chance of having bugs in the code.

Tip - When in doubt, you can always use the key combination ctrl-space to invoke the autocomplete feature of VS Code. This is also a huge benefit made possible by Prisma's type-safety, and is super handy for exploring the Prisma Client API.