コード例 #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"));
            }
        }
コード例 #2
0
        public IActionResult UpdatePerson([FromBody] Person person)
        {
            _dbHelper.UpdatePerson(person);

            return(Ok(person));
        }