public ActionResult RecentlyAdded() { var model = new PeopleListing("Recent Updates") { People = Services.Person.GetRecentlyUpdated(), ShowManage = true, TotalPeople = Services.Person.Count() }; return(PartialView("PeopleList", model)); }
public ActionResult PeopleList(string q = "") { var title = q.IsNullOrWhiteSpace() ? "All People" : $"Showing results for '{q}'"; var people = q.IsNullOrWhiteSpace() ? Services.Person.GetAll().OrderBy(x => x.FirstName).ToArray() : Services.Person.SearchNames(q, int.MaxValue).ToArray(); var model = new PeopleListing(title) { People = people, QueryTerm = q, TotalPeople = people.Count() }; return(PartialView(model)); }