---
title: "Comment by Gianluca Di Gesaro on \"Creating and Using Custom Repositories in NestJS with TypeORM 0.3\" | Hashnode"
description: "Hello Durgadas, great article. I try to use a custom repository in an helper class outside nestjs service, how I can instatiate this class passing the repositor"
url: "https://hashnode.com/posts/custom-repositories-in-nestjs-typeorm3/63cbc45d587fc59d3cd74d45/comment/64149c5ee10dd0be8d24826e"
---

[Discussion](https://hashnode.com/posts/custom-repositories-in-nestjs-typeorm3/63cbc45d587fc59d3cd74d45)

Comment [Creating and Using Custom Repositories in NestJS with TypeORM 0.3](https://hashnode.com/posts/custom-repositories-in-nestjs-typeorm3/63cbc45d587fc59d3cd74d45)

[Gianluca Di Gesaro](https://hashnode.com/@gdg87)

[Mar 17, 2023](https://hashnode.com/posts/custom-repositories-in-nestjs-typeorm3/63cbc45d587fc59d3cd74d45/comment/64149c5ee10dd0be8d24826e)

Hello Durgadas, great article. I try to use a custom repository in an helper class outside nestjs service, how I can instatiate this class passing the repository as parameter?

[Durgadas Kamath](https://hashnode.com/@durgadas)

[Mar 22, 2023](https://hashnode.com/posts/custom-repositories-in-nestjs-typeorm3/63cbc45d587fc59d3cd74d45/comment/64149c5ee10dd0be8d24826e#reply-641a7a10e592dd06478df198)

As long as you have exposed the repository within the module under exports , you should be able to inject it outside of the current service.
