public IActionResult Index() { PeopleListModel model = new PeopleListModel() { PeopleList = Service.GetPeopleList() }; return(View(model)); }
public ActionResult PersonAll(int page = 1) { var allPeople = repository.getItems <People>().Distinct().ToList(); var peoples = allPeople.OrderByDescending((p) => p.Popularity); PeopleListModel people = new PeopleListModel() { people = peoples .Skip((page - 1) * PersonOnPage).Take(PersonOnPage), pagingInfo = new PagingInfo(page, PersonOnPage, peoples.Count()) }; return(View(people)); }
public IActionResult DeleteItemsFromPeopleList([FromBody] PeopleListModel peopleList) { _peopleListService.RemoveItem(peopleList.Name); return(Ok()); }
public IActionResult AddItemToPeopleList([FromBody] PeopleListModel peopleList) { _peopleListService.AddItemsToPeopleList(peopleList); return(Ok()); }
public void AddItemsToPeopleList(PeopleListModel peopleList) { _peopleListHome.Add(peopleList.Name, peopleList.LastName); }