public static Pag <T> PagList <T>(IEnumerable <T> list, int total) { Pag <T> rst = new Pag <T>(); rst.Items = list; rst.Total = total; return(rst); }
public static Pag <T> CreatPagList <T>(IOrderedEnumerable <T> list, int start, int limit) { Pag <T> rst = new Pag <T>(); int total = list.Count(); var rlist = list.Skip(start).Take(limit).ToList(); rst.Items = rlist; rst.Total = total; return(rst); }