예제 #1
0
        public IActionResult GetNewsById(int id)
        {
            var news = _newsService.GetNewsById(id);

            if (news == null)
            {
                return(NotFound());
            }
            return(Ok(news));
        }
        public IActionResult GetNewsById(int id)
        {
            var newsItem = _newsItemService.GetNewsById(id);

            return(Ok(newsItem));
        }