Example #1
0
        public IActionResult Next(Person person)
        {
            if (!ModelState.IsValid)
            {
                return(View("Person", person));
            }

            repo.AddPerson(person);
            return(RedirectToAction("Index", "Result"));
        }
Example #2
0
        public IActionResult Next(Person person)
        {
            if (!ModelState.IsValid)
            {
                return(View("Person", person));
            }

            repo.AddPerson(person);
            ModelState.Clear();

            return(RedirectToAction("Start", "Man"));
        }