title: How to use dependency injection for inherited class?
body: <p>Here I use DI framework (Ninject) and it works fine. But One of the problem facing is, I have a base class with a single constructor that takes an implementation of an interface.</p>
  
  <pre><code>public class BaseApiController : ApiController
  {
      readonly IAccessService _accessService; 
      public BaseApiController(IAccessService accessService)
      {
          this._accessService = accessService;
      }
  }
  </code></pre>
  
  <p>When I inherit from this base class to all other controllers which have the constructors that takes implementation of the their own interfaces. I get error 'BaseApiController' does not contain a constructor that takes 0 arguments,  Ok, I understood that. The derived class is </p>
  
  <pre><code> public class DiscoverController  : BaseApiController
  {
      readonly IDiscoverService _discoverService;
      readonly IAccessService _accessService;
  
      public DiscoverController(IDiscoverService discoverService,IAccessService accessService)  
      {
          _accessService = accessService;
          _discoverService = discoverService;
      }
  }
  </code></pre>
  
  <p>How could I do this without modify the derived class ctor to take a similar parameter and pass that value on to the base ctor, I would appreciate it if you suggest better way to handle this? </p>