Example #1
0
        public ActionResult <ArticleResponse> Get(
            [FromRoute][Required] Guid articleId)
        {
            var id = new ArticleId(articleId);

            var articleResponse = _articles.Get(id);

            return(Ok(articleResponse));
        }
        private static void GetArticleById()
        {
            Console.WriteLine("\n");

            Console.Write("Id       : ");
            var rawId     = Console.ReadLine()?.Trim();
            var articleId = new ArticleId(Guid.Parse(rawId));

            var articleResponse = _articles.Get(articleId);

            Console.WriteLine(articleResponse);
        }