title: The model item passed into the dictionary is of type 'System.Data.Objects.ObjectQuery`1
body: <p>im trying to get the controller in my mvc application to edit a specific entity from a data model once the user clicks on the edit button, however I can't seem to make it work. I keep getting this error </p>
  
  <p>The model item passed into the dictionary is of type 'System.Data.Objects.ObjectQuery`1[MvcApplication1.Models.New]' but this dictionary requires a model item of type 'MvcApplication1.Models.New'.</p>
  
  <p>what am I doin wrong. is it due to the strongly typed view??</p>
  
  <p>here is my controller:</p>
  
  <pre><code>public ActionResult Edit(int id)
          {
          var productToEdit = from s in _entities.NewSet      // return the story matching the clicked id
                               where s.storyId == id
                               select s;
              return View(productToEdit);
          }
  
          // POST : Edit
          [AcceptVerbs(HttpVerbs.Post)]
          public ActionResult Edit(New productToEdit)
          {
              try
              {
                  var originalNews = (from s in _entities.NewSet
                                      where s.storyId == productToEdit.storyId
                                      select s).FirstOrDefault();
                  _entities.ApplyPropertyChanges(originalNews.EntityKey.EntitySetName, productToEdit);
                  _entities.SaveChanges();
                  return RedirectToAction("Index");
              }
              catch
              {
                  return View();
              }
  
          }
  </code></pre>
  
  <p>can someone give me a few pointers please. Im still new to all of this.</p>