In this example how UpdateModel method fill person instance with formValues?
I think UpdateModel use reflection while filling person by formValues but how updatemodel catch formValues parameter ?
[HttpPost]
public ActionResult Edit(int ID,FormCollection formValues)
{
Person person= db.PersonSet.Single(p => p.PersonID == ID);
UpdateModel(person);
db.SaveChanges();
return RedirectToAction("Details", new { ID = person.PersonID });
}
I thinks it uses something like this:
http://msdn.microsoft.com/en-us/library/system.web.httprequestbase.form.aspx
http://msdn.microsoft.com/en-us/library/system.web.mvc.controller_members.aspx
http://msdn.microsoft.com/en-us/library/dd492288.aspx