public IActionResult GetAllNews([FromQuery] int pageSize, [FromQuery] int pageNumber) { if (pageSize == 0) { pageSize = 25; } var news = new Envelope <NewsItemDto>(pageNumber, pageSize, _newsService.GetAllNews()); return(Ok(news)); }
public IActionResult GetAllNews() { Envelope <NewsItemDto> env = new Envelope <NewsItemDto>(0, 25, _newsItemService.GetAllNews()); return(Ok(env)); }