예제 #1
0
        public IActionResult Add(List <Person> people)
        {
            var mgr = new PersonManager(_connectionString);

            mgr.AddPeople(people.Where(p => !String.IsNullOrEmpty(p.FirstName) && !String.IsNullOrEmpty(p.LastName)).ToList());
            TempData["success-message"] = "People added successfully!";

            return(Redirect("/home/index"));
        }