public ActionResult Update(Guid id) { var record = DemoService.Get(id); var model= new DemoUpdateCommand(); model.DemoString = record.DemoString; return View(model); }
public ServiceResult<bool> Update(DemoUpdateCommand cmd) { return ExecuteCommand(cmd, () => { Trace.WriteLine("Update"); return new ServiceResult<bool>(true); }); }
public ActionResult Update(Guid id, DemoUpdateCommand cmd) { cmd.ID = id; if (DemoService.Update(cmd).Payload) { return RedirectToAction("Index"); } else { return View(cmd); } }