public IActionResult Update(int id) { var result = _personListClient.Get(new GetPersonQuery { Id = id }); return(View(FormModel.FromModel(result.Person))); }
public IActionResult Update(FormModel <Person> form) { try { _personListClient.Put(new UpdatePersonCommand { Person = form.Data }); } catch (ValidationException e) { return(View(FormModel.FromModel(form.Data, e))); } return(Redirect("/")); }
public IActionResult Add() { return(View("Update", FormModel.FromModel(new Person()))); }