// GET: Building /* public BuildingController(PeopleProRepo peopleProRepo) * { * this.peopleProRepo = peopleProRepo; * } */ /* public ActionResult Index(string sortOrder, string CurrentSort, int? page) * {}*/ public ActionResult Index() { IEnumerable <Building> buildings = m_repo.GetAllBuildings(); if (!buildings.Any()) { //If there are no buildings, we should provide the ability to create them? return(RedirectToAction("Create")); } //paginate buildings, what if there are 10000, do we want the user to scroll through all of that? //look up IPagedList<T> return(View(buildings.ToList())); }