@hatkom/prisma-generator-c-sharp
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Generate C# records based on Prisma schema

Input:

model Post {
  id Int
  title String
  content String
  published Boolean
  author User
}

model User {
  id Int
  name String
  email String
  posts Post[]
}

Output:

public record Post(
  int id, 
  string title, 
  string content, 
  bool published, 
  User author
);

public record User(
  int id, 
  string name, 
  string email, 
  Post[] posts
);

Supported:

  • Scalars
  • Enums
  • Arrays
  • Relations
  • Optional fields

Package Sidebar

Install

npm i @hatkom/prisma-generator-c-sharp

Weekly Downloads

12

Version

1.1.0

License

MIT

Unpacked Size

24.1 kB

Total Files

16

Last publish

Collaborators

  • vladhatko
  • maxschmide