Esempio n. 1
0
        public string ViewRandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

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

            return(FormatOutput(article, false));
        }
Esempio n. 2
0
        public ActionResult ViewRandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

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

            return(FormatOutput(article, false));
        }
Esempio n. 3
0
        public ActionResult RandomArticle()
        {
            var article = ArticleModel.GetRandomArticle();

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