public IActionResult GetAllNewsItems([FromQuery] int pageNumber = 1, [FromQuery] int pageSize = 25)
        {
            var newsItems = _newsItemService.GetAllNewsItems().ToList();
            var envelope  = new Envelope <NewsItemDto>(pageNumber, pageSize, newsItems);

            return(Ok(envelope));
        }
        public IActionResult GetAllNews()
        {
            var pageSize   = 25;
            var pageNumber = 0;

            if (HttpContext.Request.QueryString.HasValue)
            {
                var sizeString   = HttpContext.Request.Query["pageSize"];
                var numberString = HttpContext.Request.Query["pageNumber"];
                if (!int.TryParse(sizeString, out pageSize) || !int.TryParse(numberString, out pageNumber))
                {
                    return(BadRequest("Invalid parameters"));
                }
            }

            return(Ok(_newsItemService.GetAllNewsItems(pageSize, pageNumber)));
        }
        public IActionResult GetAllNewsItems([FromQuery] int pageNumber = 1, [FromQuery] int pageSize = 25)
        {
            var newsItems = _newsItemService.GetAllNewsItems(pageSize, pageNumber);

            return(Ok(newsItems));
        }