Beispiel #1
0
        public IActionResult Get(int articleId)
        {
            try
            {
                var article = _article.Get(articleId);

                if (article == null)
                {
                    return(NotFound($"There is no book for Id: {articleId}"));
                }

                return(Ok(article));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }