Page Contents
Home > @loopback/repository > RepositoryMixinDoc > getRepository
RepositoryMixinDoc.getRepository() method
Retrieve the repository instance from the given Repository class
Signature:
getRepository<R extends Repository<any>>(repo: Class<R>): Promise<R>;
Parameters
Parameter | Type | Description |
---|---|---|
repo | Class<R> | The repository class to retrieve the instance of |
Returns:
Promise<R>