public void ActionIndex(MImagesTourModel model) { var dbQuery = ModImagesTourService.Instance.CreateQuery() .Where(o => o.Activity == true) .OrderByDesc(o => o.ID) .Take(PageSize) .Skip(PageSize * model.Page); ViewBag.Data = dbQuery.ToList(); model.TotalRecord = dbQuery.TotalRecord; model.PageSize = PageSize; ViewBag.Model = model; }
public void ActionIndex(MImagesTourModel model) { var dbQuery = ModImagesTourService.Instance.CreateQuery() .Where(o => o.Activity == true) .OrderByDesc(o => o.ID) .Take(PageSize) .Skip(PageSize * model.Page); ViewBag.Data = dbQuery.ToList(); model.TotalRecord = dbQuery.TotalRecord; model.PageSize = PageSize; ViewBag.Model = model; }