Skip to content

Instantly share code, notes, and snippets.

@nmchenry01
Last active August 13, 2020 22:47
Show Gist options
  • Select an option

  • Save nmchenry01/01176d838d46b008a05af97187d64edc to your computer and use it in GitHub Desktop.

Select an option

Save nmchenry01/01176d838d46b008a05af97187d64edc to your computer and use it in GitHub Desktop.
Create customer example for "Prisma vs. TypeORM"
const createCustomer = async (prisma: PrismaClient) => {
await prisma.customer.create({
data: {
username: 'Customer1',
email: 'Customer1@gmail.com',
products: {
connect: [
{
name: 'Car',
},
{
name: 'Dynamite',
},
],
},
},
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment