I have a class Foo with a field UpdateMe of type Confirmation as described below..
public class Foo
{
public Confirmation UpdateMe{get;set;}
public int BarInt{get;set}
}
public enum Confirmation
{
N = 0,
Y = 1
}
I have a whitelist that has UpdateMe, and runs the following way...
[AcceptVerbs(HttpVerbs.Post), ValidateAntiForgeryToken]
public ActionResult Update(Foo foo)
{
if(ModelState.IsValid)
{
//this is the Foo as it exists in the backend..using Linq2Sql read/record behavior
Foo existingFoo = _Service.GetFoo();
string[] whitelist = { "UpdateMe" };
UpdateModel(existingFoo, whitelist);
//do persistence stuff down here...
}
}
the model is bound just fine, the incoming Foo has whatever UpdateMe value I set, however the UpdateModel procedure is not updating the property.
This has been ridiculously simplified, but rest assured the UpdateModel is working for other properties coming through the action.
Any idea why this particular public property is not updating?