title: ASP.NET MVC: How can I get my actual object when using my Edit action?
body: <p>I'm just starting to play with asp.net mvc and I've got a very basic question:</p>
  
  <p>If I have a view that shows information about <code>System.Web.Mvc.ViewPage&lt;Foo&gt;</code>, how can I get the actual object when passing the form values to my Edit Action on my FooController?
  By default I got this implementation of the Edit action:</p>
  
  <pre><code>public ActionResult Edit(int id, FormCollection collection)
  </code></pre>
  
  <p>Is there any way I could have another overload like this?</p>
  
  <pre><code>public ActionResult Edit(int id, Foo myObject)
  </code></pre>
  
  <p>Thanks.</p>
  
  <p>EDITED:</p>
  
  <p>Sorry guys, just a little bit more of background so you understand what I was thinking of doing....as I have my own framework to replay the changes I made on my entities I didn't need to re-query my entity and use the UpdateModel() method. What I ended up doing was just having a method like this:</p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public ActionResult Edit(Foo myObject)
  {
  }
  </code></pre>
  
  <p>I did not know but that works perfectly fine. Thanks to the answer which led me to this post: <a href="http://www.haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx" rel="nofollow noreferrer">http://www.haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx</a></p>