Пример #1
0
        public string ViewRandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

            if (article == null)
            {
                return(ErrorStatus("Service Unavailable"));
            }

            return(FormatOutput(article, false));
        }
Пример #2
0
        public ActionResult ViewRandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

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

            return(FormatOutput(article, false));
        }
Пример #3
0
        public ActionResult RandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

            return(RedirectToAction("ViewArticle", new { articleSlug = article.Slug }));
        }