I am using Subsonic 3 ActiveRecord approach and was wondering what was most efficient in terms of posting data. Here are the 2 scenarios:
i)
public ActionResult Edit(Person PostedItem)
{
Person p = new Person(PostedItem.ID);
p.Name = PostedItem.Name;
p.Update();
}
ii)
public ActionResult Edit(FormCollection PostedItem)
{
Person p = new Person(PostedItem["ID"]);
p.Name = PostedItem["Name"];
p.Update();
}
I would imagine the FormCollection is more efficient as the modelbinding reflection process does not need to occur however its nicer to have something strongly typed.
Is there an alternative approach? Is there anything else that can be put in the Edit parameters that pass the posted data?
Thanks