Example #1
0
        public AuthorDetailDto GetAuthorById(int id)
        {
            var author = _newsRepository.GetAuthorById(id);

            if (author == null)
            {
                throw new Exception($"news with id {id} was not found.");
            }

            return(author);
        }