title: No idea why my MVC Entity-Framework app cannot find elements in database
body: <p>Just found some live bugs on my blog and I have no clue as to why they are happening. If you want to see the full big ugly message just go <a href="http://www.nerdlythings.com" rel="nofollow noreferrer">here</a></p>
  <p>The code that is giving me the issue is this:</p>
  <pre><code>    NerdlyContext db = new NerdlyContext();
      public IEnumerable&lt;Post&gt; GetIndexPage(int? page)
      {
          int pageSize = 5;
          int pageNumber = (page ?? 1);
          var posts = from p in db.Posts
                      where p.Published == true &amp;&amp; p.Archived == false
                      orderby p.DateCreated descending
                      select p;
          var result = posts.ToPagedList(pageNumber, pageSize);
          return result;
      }
  </code></pre>
  <p>I tried to see test is my doing a quick db.Posts.FirstorDefault() to see if it was getting anything, but it seems like it is not hitting my db at all. I opened up the db in SSMS and all the data is the same. I am hosted on discountasp.net and re-copied the exact connection string back over to make sure nothing accidentally got changed. Still not working. The only recent changes I made was I tried to add some more dbset items, but that through an error on the package manage console, so I undid all the changed, rebuilt the solution, and now I got this..</p>
  <h1>Update</h1>
  <p>Digging deeper into when it instantiates my DbContext, it say the change tracker is throwing an error.</p>