Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is the performance different between Repository and Entity Manager in TypeORM?

I am new in TypeORM and very confused when I should use Entity manager, and repository.
As far as I know, the difference is I should specify the entity when using entity manager, but not for repository.
Not sure the performance is the same for both case.

I have used both way, but didn’t find any difference in functionality.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The performance is the same.
But prefer to use repository.
Each entity has its own repository which handles all operations with its own entity and repositories are more convenient to use than EntityManagers when deal with entities a lot.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading