Exemplo n.º 1
0
        public async Task <IActionResult> Get(int id)
        {
            var article = await _repo.GetArticleDetailed(id);

            if (article == null)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, new Response <ArticleDetailDto>()
                {
                    Succeeded = false, Message = "مقاله پیدا نشد"
                }));
            }

            return(Ok(new Response <ArticleDetailDto>(article)));
        }