title: How to create service with Repository exports?
body: <p>I created service with several repository:</p>
  <pre><code>@Injectable()
  export class DataService {
      constructor(
          @InjectRepository(ClassicPrices, 'connect')
          private classicPrices: Repository&lt;ClassicPrices&gt;,
  
          @InjectRepository(ModernPrices, 'connect')
          private modernPrices: Repository&lt;ModernPrices&gt;,
      ) {}
  
      public pricesRepository(server): Repository&lt;ModernPrices | ClassicPrices&gt; {
          switch (server) {
              case 'modern':
                  return this.modernPrices;
              case 'classic':
                  return this.classicPrices;
          }
      }
  }
  </code></pre>
  <p>Data module settings:</p>
  <pre><code>@Module({
    imports: [
      TypeOrmModule.forFeature([
        ClassicPrices,
        ModernPrices
      ], 'connect'),
    ],
    providers: [DataService],
    exports: [DataService]
  })
  export class DataModule {}
  </code></pre>
  <p>When I use it in another modules^ I have error &quot;Nest can't resolve dependencies of the DataService (connect_ClassicPrices). Please make sure that the argument  connect_ClassicPrices at index [2] is available in the DataModule context.</p>
  <p>Potential solutions:</p>
  <ul>
  <li>If  connect_ClassicPrices is a provider, is it part of the current DataModule?</li>
  <li>If  connect_ClassicPrices is exported from a separate @Module, is that module imported within DataModule?</li>
  </ul>
  <pre><code>  @Module({
      imports: [ /* the Module containing  connect_ClassicPrices */ ]
    })
  </code></pre>
  <p>How to export repository ?</p>