title: Resolving instances with ASP.NET Core DI from within ConfigureServices
body: <p>How do I manually resolve a type using the ASP.NET Core MVC built-in dependency injection framework?</p>
  
  <p>Setting up the container is easy enough:</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      // ...
  
      services.AddTransient&lt;ISomeService, SomeConcreteService&gt;();
  }
  </code></pre>
  
  <p>But how can I resolve <code>ISomeService</code> without performing injection?  For example, I want to do this:</p>
  
  <pre><code>ISomeService service = services.Resolve&lt;ISomeService&gt;();
  </code></pre>
  
  <p>There are no such methods in <code>IServiceCollection</code>.</p>