title: Dependency Injection ASP.NET Core: Register multiple implementations
body: <p>I have the following classes structure:</p>
  
  <pre><code>interface IContractService{}
  
  class Service1 : IContractService{}
  
  class Service2 : IContractService{}
  
  class ContractServiceFactory
  {
      private readonly IServiceProvider _serviceProvider;
       ContractServiceFactory(IServiceProvider serviceProvider)
      {
          _serviceProvider = serviceProvider;            
      }
       IContractService GetContractService(string standard)
      {
          // Is it possible to retrieve service by string const???
          return _serviceProvider.GetRequiredService&lt;IContractService&gt;(standard);
      }
  }
  </code></pre>
  
  <p>In the services collection I would like to add my classes in the following way:</p>
  
  <pre><code>builder.Services.AddScoped&lt;IContractService, ContractService1&gt;("standard1");
  builder.Services.AddScoped&lt;IContractService, ContractService2&gt;("standard2");
  </code></pre>
  
  <p>Is it possible in .net core 2.1?</p>