public IActionResult Add_View_People()
 {
     if (peopleViewModel == null)
     {
         peopleViewModel = ps.All();
     }
     return(View(peopleViewModel));
 }
        public IActionResult DeletePeople(string id)
        {
            PeopleService ps = new PeopleService();

            ps.Remove(Convert.ToInt32(id));

            PeopleViewModel peopleViewModel = ps.All();

            peopleViewModel = ps.All();
            return(RedirectToAction(nameof(ViewPeople)));
        }
        public IActionResult AddPeople()
        {
            PeopleService   ps = new PeopleService();
            PeopleViewModel peopleViewModel = ps.All();

            if (peopleViewModel == null)
            {
                peopleViewModel = ps.All();
            }
            return(View(peopleViewModel));
        }
 public IActionResult Index() //List
 {
     return(View(_peopleService.All()));
 }