public IActionResult GetNewsById(int id) { NewsItemDetailDto NewsDetail = _trService.GetNewsById(id); var TmpList = Enumerable.Repeat(NewsDetail, 1); IEnumerable <NewsItemCategories> NewsCategories = _trService.GetNewsCategoriesById(id); IEnumerable <NewsItemAuthors> NewsAuthors = _trService.GetNewsAuthorsById(id); List <ExpandoObject> FilteredNewsCategories = FilerCategories(NewsCategories, id); List <ExpandoObject> FilteredNewsAuthors = FilterAuthors(NewsAuthors, id); return(Ok(NewsItemDetailHelper(NewsDetail, FilteredNewsCategories, FilteredNewsAuthors, id))); }