Example #1
0
        public IActionResult Create(PersonAccomplishmentCommand input)
        {
            if (!ModelState.IsValid)
            {
                return(View("Index", input));
            }
            else
            {
                Person person = MapPerson(input);
                person = _helper.CreatePerson(person);

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

            return(RedirectToAction("GetAllPersons"));
        }