public ActionResult EditMailConfig() { ModelState.Clear(); var model = new EditModel_MailConfig(); MailDb.CopyTo(model); if (!MailDb.Valid.GetValueOrDefault()) ModelState.AddModelError("", MailDb.ValidationMessage); return View("EditMailConfig", model); }
public ActionResult EditMailConfig(EditModel_MailConfig mailConfig) { if (!ModelState.IsValid) return View("EditMailConfig", mailConfig); mailConfig.CopyTo(MailDb); MailDb.Reevaluate(); CsoContext.Db.SyncAnabolicChanges(); return EditMailConfig(); }