UpdateModel завершается сбоем, так как arcm.Notes в этот метод был пустым, и я хочу, чтобы это была пустая строка.
Может быть, мне нужно обновить ValueProvider (?) После установки Notes для "", чтобы я мог использовать UpdateModel.
public ActionResult Edit1(Guid id, ActivityResponseConsumerMobile arcm) {
if (arcm.Notes == null)
arcm.Notes = "";
if (!ModelState.IsValid) {
SetupDropDowns();
return View(arcm);
}
ActivityResponseConsumerMobile arcmDb = uow.ActivityResponseConsumerMobiles.Single(a => a.Id == id);
try {
UpdateModel(arcmDb, null, null, new[] { "Id" });