public PersonWithPaging GetWithPage(int pageNumber) { PersonWithPaging personWithPaging = new PersonWithPaging(); personWithPaging.EntitiesCount = Query().Count(); personWithPaging.Entity = Query().Skip(pageNumber * PagingConstants.DefaultPageSize).ToList(); personWithPaging.PageNumber = pageNumber; return(personWithPaging); }
public IActionResult GetWithPage([FromQuery(Name = "page")] int page) { PersonWithPaging persons = _personsPriovider.GetWithPage(page); return(Ok(persons)); }