public IActionResult OnPost(int bookId) { var book = bookData.Delete(bookId); bookData.Commit(); if (book == null) { return(RedirectToPage("./NotFound")); } TempData["Message"] = $"Knjiga uspešno zbrisana: {book.Naslov}"; return(RedirectToPage("./List")); }
public IActionResult DeleteConfirmed(int id) { _books.Delete(id); _books.Commit(); return(RedirectToAction("Index")); }