Exemplo n.º 1
0
        public ActionResult Delete(int id, IFormCollection collection)
        {
            try
            {
                _quotesRepo.DeleteQuote(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
Exemplo n.º 2
0
        public async Task DeleteQuote(int id)
        {
            try
            {
                _repo.DeleteQuote(id, GetServerId());

                await ReplyAsync($"The quote was succesfully deleted.");
            }
            catch (Exception e)
            {
                await ReplyAsync(e.Message);
            }
        }
 public void DeleteQuote(int id)
 {
     _quoteRepo.DeleteQuote(id);
 }