title: entity framework delete record
body: <p>I am trying to delete record from table <code>store</code> but I having problem of recognizing <code>DeleteObject</code> in my code. I have reference  </p>
  
  <pre><code>using System.Linq;
  using System.Data.Entity;
  using System.Data.Objects;
  </code></pre>
  
  <p>but it still not working. I am using <code>MVC 4</code> using <code>Visual Studio 2012</code>.</p>
  
  <pre><code>public void Delete()
  {
      using (var db = new AppContext())
      {
          var query_D = (from b in db.Stores
                     where b.storeID == 1
                     select b).First();
  
          db.DeleteObject(query_D);
          db.SaveChanges();
      } 
  }
  </code></pre>
  
  <p>thanks in advance</p>