Exemplo n.º 1
0
        public IActionResult EditPerson(PersonAccomplishmentCommand input)
        {
            if (!ModelState.IsValid)
            {
                return(View("EditPerson", input));
            }
            else
            {
                Person newPerson = MapPerson(input);
                newPerson.PersonID = input.PersonID;
                _helper.UpdatePerson(newPerson);

                return(RedirectToAction("AllPersons"));
            }
        }
        public IActionResult UpdatePerson([FromBody] Person person)
        {
            _dbHelper.UpdatePerson(person);

            return(Ok(person));
        }