title: Get specific service that many class implemented that service without instantiate other classes
body: <p>I have below example: </p>
  
  <pre><code>public interface IPerson
  {
       string Name {get;}
  }
  </code></pre>
  
  <p>and 2 classes Implement this interface as below:</p>
  
  <pre><code>public class John : IPerson
  {
           string Name {get;} = "John";
  }
  
  public class Anna : IPerson
  {
           string Name {get;} = "Anna";
  }
  </code></pre>
  
  <p>When using Service provider i use below method</p>
  
  <pre><code>serviceProvider.GetServices&lt;IPerson&gt;().SingleOrDefault(i =&gt; i.Name== "John");
  </code></pre>
  
  <p>As I know all tow class instantiated  and above method returns a class that its name is "John".
  Actually I have many of these classes and its not a good idea to do this in this way. Is it a better way to do this?</p>