TryUpdateModel() public method

public TryUpdateModel ( IModelValueProvider provider, object model ) : bool
provider IModelValueProvider
model object
return bool
Exemplo n.º 1
0
 public bool TryUpdateModel(object model, string[] include_fields=null, string[] exclude_fields=null)
 {
     ModelBinder b = new ModelBinder(ModelState);
     b.IncludeFields = include_fields;
     b.ExcludeFields = exclude_fields;
     return b.TryUpdateModel(new HttpModelValueProvider(Context), model);
 }