public static async Task <IPagedList <T> > Create(IQueryable <T> superset, int pageNumber, int pageSize) { var list = new PagedListAsync <T>(); await list.InitAsync(superset, pageNumber, pageSize); return(list); }
public static async Task <IPagedList <T> > ToPagedListAsync <T>(this IQueryable <T> superset, Int32 pageNumber, Int32 pageSize) { return(await PagedListAsync <T> .Create(superset, pageNumber, pageSize)); }