title: ASP.NET MVC 3 add controller throws error "Object reference not set to an instance of object"
body: <p>I get below error when I try to add controller to my ASP.NET MVC 3 intranet project</p>
  
  <blockquote>
    <p>Object reference not set to an instance of object</p>
  </blockquote>
  
  <p>I am following an article <a href="http://sumitmaitra.wordpress.com/2011/11/13/fun-with-signalr/" rel="nofollow noreferrer">http://sumitmaitra.wordpress.com/2011/11/13/fun-with-signalr/</a> to develop SignalR application.</p>
  
  <p>I doubt that after installing SignalR something went wrong but not very sure about it.</p>
  
  <h2>Edit</h2>
  
  <p>Model code:</p>
  
  <pre><code>public class BlogPost
  {
      [Key]
      public int Id { get; set; }
      [Required]
      public string Title { get; set; }
      public string Post { get; set;}
  }
  </code></pre>
  
  <p>DbContext:</p>
  
  <pre><code>namespace SignalR.Models
  {
      public class BlogPostContext : DbContext
      {
          public DbSet&lt;BlogPost&gt; BlogPosts { get; set; }
      }
  }
  </code></pre>
  
  <p>Controller:</p>
  
  <p><img src="https://i.stack.imgur.com/nOKqA.png" alt="Controller"></p>