public static FeedPageModel FeedModel(int id,int pageIndex) { var model = new FeedPageModel(); var result = MvcApplication.DbClient.Execute(new GetFeedItemsByFeedQuery(id, pageIndex)); model.Items = result.Items; model.Feed = MvcApplication.DbClient.Execute(new GetFeedByIdQuery(id)); model.TotalResults = result.TotalResults; model.PageIndex = pageIndex; model.Skipped = (pageIndex*100); ReplaceUrl(model.Items); return model; }
public static FeedPageModel FeedModel(int id, int pageIndex) { var model = new FeedPageModel(); var result = MvcApplication.DbClient.Execute(new GetFeedItemsByFeedQuery(id, pageIndex)); model.Items = result.Items; model.Feed = MvcApplication.DbClient.Execute(new GetFeedByIdQuery(id)); model.TotalResults = result.TotalResults; model.PageIndex = pageIndex; model.Skipped = (pageIndex * 100); ReplaceUrl(model.Items); return(model); }