public static PaginationViewModel <T> Build(IEnumerable <T> items, ApiParameters apiParameters, int totalCount) { var paginationViewModel = new PaginationViewModel <T> { _items = items.ToList() }; paginationViewModel.SetPaginationState(totalCount, apiParameters); return(paginationViewModel); }
public static PaginationViewModel <T> Build(IEnumerable <T> items) { var paginationViewModel = new PaginationViewModel <T> { _items = items.ToList() }; paginationViewModel.SetPaginationState(items.Count(), 1, items.Count()); return(paginationViewModel); }