/// <summary> /// Ctor /// </summary> /// <param name="source">source</param> /// <param name="pageIndex">Page index</param> /// <param name="pageSize">Page size</param> public PagedList(IList <T> source, int pageIndex, int pageSize) { PagingResult = new PagingResult(pageIndex, pageSize); PagingResult.TotalCount = source.Count(); var skipCount = pageIndex * pageSize; var data = source.Skip(skipCount).Take(pageSize).ToList(); PagingResult.RecordCount = data.Count; this.AddRange(data); }
public BusinessCountManageList(List<BusinessViewModel> _businessModel, PagingResult pagingResult) { businessModel = _businessModel; PagingResult = pagingResult; }