title: .NET Core DI, register a default implementation for a package
body: <p>How can one register a default implementation using the IoC container for .NET Core and also provide a way to override the existing implementation ?</p>
  
  <p>For example, I might want to create a package which provide a default implementation for some service. </p>
  
  <pre><code>namesapce Package 
  {
      public interface ISomeService { }
  
      public class Default : ISomeService { }
  }
  </code></pre>
  
  <p>This service is then used inside the same package. </p>
  
  <pre><code>namesapce Package 
  {
      public class Service 
      {
          Service(ISomeService service) { }
      }
  }
  </code></pre>
  
  <p>How to register the <code>ISomeService</code> default implementation? </p>
  
  <p>Later when using this package in some project and want to override the existing implementation with another the Default should be replaced with Override.</p>
  
  <pre><code>namespace Project 
  {
      public class Override : ISomeService { }
  }
  </code></pre>