public IActionResult Delete(int quoteId) { musicQuotesRepo repo = new musicQuotesRepo(); repo.DeleteQuote(quoteId); return(RedirectToAction("Index", "Quotes")); }
public IActionResult Add(string quote, string song, string artist, string genre) { musicQuotesRepo repo = new musicQuotesRepo(); repo.InsertQuote(quote, song, artist, genre); return(RedirectToAction("Index", "Quotes")); }
public IActionResult Index() { musicQuotesRepo repo = new musicQuotesRepo(); QuoteIndexViewModel viewModel = new QuoteIndexViewModel(); viewModel.Quotes = repo.GetAllQuotes(); return(View(viewModel)); }