Ejemplo n.º 1
0
        public async Task ListQuotes()
        {
            try
            {
                var quotes = _repo.GetAllQuotes(GetServerId());

                if (quotes == null || quotes.Count < 1)
                {
                    await ReplyAsync("No quotes found for this server. Add one with `!addquote`.");
                }
                else
                {
                    ListAndSendQuotes(quotes, "All quotes", "Type !ListQuotes to see this information.");
                }
            }
            catch (Exception e)
            {
                await ReplyAsync(e.Message);
            }
        }
 public List <Quote> GetAllQuotes()
 {
     return(_quoteRepo.GetAllQuotes());
 }
Ejemplo n.º 3
0
 // GET: Quotes
 public ActionResult Index()
 {
     return(View(_quotesRepo.GetAllQuotes()));
 }