public async Task OnGetAsync() { if (PageIndex == 0) { PageIndex = 1; } // add param filterByName for filtering lamps = await ServiceMan.GetAsync(PageIndex, ItemPerPage, FilterByName); var totalLampu = ServiceMan.GetTotalData(); TotalPage = (int)Math.Ceiling(totalLampu / (double)ItemPerPage); }
public ActionResult <int> GetTotalData() { var totalData = ServiceMan.GetTotalData(); return(Ok(totalData)); }