Exemple #1
0
        public IActionResult RandomQuote()
        {
            var newQuoteList = _quotes.ReadAllQuotes().ToList();
            var randIntLTTen = _r.Next(newQuoteList.Count);
            var quote        = newQuoteList[randIntLTTen];

            return(Json(new
            {
                Quote = quote.TheQuote,
                WhoSaidIt = quote.WhoSaidIt
            }));
        }
Exemple #2
0
 public IActionResult Index()
 {
     return(View(_quotes.ReadAllQuotes()));
 }