title: Get an Instance using Ninject
body: <p>How can I get a single instance using Ninject? Here's my Service Module:</p>
  
  <pre><code>public class ServicesModule : NinjectModule
  {
      public override void Load()
      {
          Kernel.Bind&lt;IDocumentServiceApi&gt;().To&lt;DocumentServiceApi&gt;().InRequestScope();
          Kernel.Bind&lt;IConfigurationService&gt;().To&lt;ConfigurationService&gt;().InRequestScope();
          Kernel.Bind&lt;IReportGenerationProcessor&gt;().To&lt;ReportGenerationProcessor&gt;().InRequestScope();
      }
  }
  </code></pre>
  
  <p>I need an instance of <code>IReportGenerationProcessor</code> to fire off a message I am receiving from an Azure Service Bus Queue.</p>
  
  <p>I've seen a lot of different ways, but none have worked for me. I constantly get the error :<code>Object instance not set to an instance of an object</code>.</p>
  
  <pre><code>//I do instantiate this class using new WebJobBase();
  public class WebJobBase
      {
          public void ProcessMessage(BrokeredMessage message)
          {
                  // Just need an instance of IReportGenerationProcessor here
                  var _processor = new ReportGenerationProcessor();
                  _processor.ProcessMessage(message);
          }
      }
  </code></pre>
  
  <p>Here's my <code>IReportGenerationProcessor</code> implementation:</p>
  
  <pre><code>    public interface IReportGenerationProcessor
      {
          DocumentMetaData ProcessMessage(BrokeredMessage message);
      }
      public class ReportGenerationProcessor : IReportGenerationProcessor
      {
          // Go figure these don't work either
          [Inject]
          public IConfigurationService _config { get; set; }
          [Inject]
          public IDocumentServiceApi _docService { get; set; }
  
          public DocumentMetaData ProcessMessage(BrokeredMessage message)
          {
              var report = message.GetBody&lt;ReportMetaData&gt;();
  
              //Do some stuff
              return new DocumentMetaData(); // just a place holder
          }
      }
  </code></pre>
  
  <p>If I can provide more information, please let me know. I'm not too knowledgeable on Ninject.</p>