コード例 #1
0
        public ActionResult ViewRandomArticle()
        {
            var articleSlim = this.GetRandomArticleInternal();

            if (articleSlim == null)
            {
                return(ErrorStatus(HttpStatusCode.ServiceUnavailable, "Service Unavailable"));
            }

            var article = ArticleModel.FromTable(DB.Articles_GetArticleById(articleSlim.Article_Id));

            return(FormatOutput(article, false));
        }