title: SqlException (0x80131904): Invalid object name 'dbo.Categories'
body: <p>I am getting the exception above when I run an application. The application is using asp.net mvc 3 / C#. I made an mdf file and added it under App_Data folder in Visual Web Developer Express. I added connection strings to the web.config folder but when I run and browse to /store, I get the error above with the line <code>var categories = storeDB.Categories.ToList();</code> highlighted. My database contains 6 tables and one of them is Category. </p>
  
  <p>Controller:</p>
  
  <pre><code>EventCalendarEntities storeDB = new EventCalendarEntities();
  
  public ActionResult Index()  
  {  
      var categories = storeDB.Category.ToList();  
      return View(categories);  
  }    
  </code></pre>
  
  <p>Connection strings in web.config file:</p>
  
  <pre><code>&lt;connectionStrings&gt;
     &lt;add name="EventCalendarEntities"
          connectionString="data source=.\SQLEXPRESS;
          Integrated Security=SSPI;
          AttachDBFilename=|DataDirectory|\MvcEventCalendar.mdf;
          User Instance=true"
          providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>