public async Task <ActionResult <IEnumerable <Material> > > GetMaterials([FromQuery] int page = 1) { page--; var cnt = _context.Materials.Count(); return(View("Get", new DataViewModel <Material>() { Data = _cachedService.GetMaterial(page, _size), PageCount = cnt / _size + (cnt % _size > 0 ? 1 : 0), CurrentPage = page }));; }