public async Task <IActionResult> Index(int page = 1) { var view = new NewsItemListViewModel { News = _newsViewModelService.ListByPage(PageSize, page), PagingInfo = new PagingInfo { CurrentPage = page, ItemsPerPage = PageSize, TotalItems = _newsViewModelService.GetAllCount() }, }; ViewBag.ReturnUrl = Request.Path; return(View(view)); }
public NewsItemListPage() { InitializeComponent(); _viewModel = new NewsItemListViewModel(Navigation); BindingContext = _viewModel; }