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