public void Update(int id, PersonDtoPut input) { _personRepository.Update(id, ent => { ObjectMapper.Map(input, ent); }); }
public IActionResult Update(int id) { var person = _personAppService.GetPerson(id); PersonDtoPut newPerson = new PersonDtoPut { FirstName = person.FirstName, LastName = person.LastName, OfficeId = person.OfficeId }; var offices = SelectOffice(); ViewData["OfficeList"] = offices; return(View(newPerson)); }
public IActionResult Update(int id, PersonDtoPut input) { _personAppService.Update(id, input); return(RedirectToAction("Index")); }