public ActionResult BulletinsNextPage(BulletinsPageMetadata metadata) { // Use page metadata to retrieve bulletins var bulletins = BulletinService.List(metadata.Contract, 0); // Map pageable instance with page metadata var data = bulletins.ToBulletinViewModelList(new Pageable <BulletinViewModel>(metadata));// MappingEngine.Map<IEnumerable<BulletinModel>, IPageable<BulletinViewModel>>(bulletins, new Pageable<BulletinViewModel>(metadata)); return(PagedView(data, "_PagedBulletins")); }
/// <summary> /// List of bulletins. /// </summary> public ActionResult Bulletins() { var model = new BulletinsViewModel(); // Set metadata to be for ESS Web bulletins var metadata = new BulletinsPageMetadata { Contract = BulletinType.RJCP }; // Get all ESS Web bulletins var bulletins = BulletinService.List(metadata.Contract, 0); // Map pageable instance with page metadata model.Bulletins = bulletins.ToBulletinViewModelList(new Pageable <BulletinViewModel>(metadata));// MappingEngine.Map<IEnumerable<BulletinModel>, IPageable<BulletinViewModel>>(bulletins, new Pageable<BulletinViewModel>(metadata)); return(View(model)); }