public ActionResult Index(int?page) { int pagesize = 1; int pagenumber; var works = workRepository.GetAll().Reverse(); var user = profileRepository.GetByID(WebSecurity.CurrentUserId); if (user.Profile != null) { pagesize = user.Profile.NumerOfResults; if (pagesize == 0) { pagesize = 10; } } pagenumber = (page ?? 1); return(View(works.ToPagedList(pagenumber, pagesize))); }
public List <Work> ShowAllWork() { return(_repository.GetAll()); }