Пример #1
0
        public IActionResult AddPeople(List <Person> people)
        {
            var db = new PeopleDb(_connectionString);

            db.AddPeople(people);
            if (people.Count > 1)
            {
                TempData["message"] = "People added successfully!";
            }
            else
            {
                TempData["message"] = "Person added successfully!";
            }

            return(Redirect("/"));
        }