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