title: NodeJS map Dtos to TypeORM Entities
body: <p>I have a <code>nodejs</code> REST API backend running the <code>nestjs</code> framework, using <strong>typeORM</strong> as <strong>ORM</strong> for my entities.</p>
  
  <p>Coming from a <code>C#/Entity Framework</code> background, I am very used to have my Dtos mapped to the database entities.</p>
  
  <p>Is there a similar approach with typeORM? </p>
  
  <p>I have seen the <a href="https://www.npmjs.com/package/automapper-ts" rel="noreferrer">automapper-ts</a> library, but those magic strings in the map declarations look kind of scary...
  Basically it would be amazing if I could :</p>
  
  <pre><code>let user: TypeORMUserEntity = mapper.map&lt;TypeORMUserEntity&gt;(userDto);
  </code></pre>
  
  <p>What is the way to do this (or any alternative with same result) in nodejs/typeorm backend environment?</p>