Skip to content

[Question] Right way of using automapper with PrismaΒ #276

@t0xa

Description

@t0xa

Hello @nartc,

First of all, thank you for such incredible project. It helped me to build things much faster. Do you have a Patreon or Buy me a coffee so we can show our appreciation?

Could you please help me to understand how to correctly use Automapper with Prisma ORM.

The main problem is that Prisma generates type instead of class. For example:

export type Endpoint = {
  id: number
  guid: string
  description: string | null
  url: string
  status: EndpointStatus
  createdat: Date
  updatedat: Date
}

Is there a way of doing mapper.createMap() with types or some other way of creating such mapper?

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions