import { Connection } from 'typeorm' ; import { Catalog } from '../entities/catalog.entity' ; export const CatalogProvider = [ { provide : 'CATALOG_REPOSITORY' , useFactory : ( connection ) => connection . getRepository ( Catalog ) , inject : [ 'DATABASE_CONNECTION' ] , } ] ;