public IActionResult DeleteBookCopy(int bookId, int libraryId)
        {
            var copy = bookCopiesService.DeleteCopy(bookId, libraryId);

            bookCopiesService.Commit();

            return(RedirectToAction("Details", new { id = copy.LibraryId }));
        }
        public IActionResult OnPostDelete(int bookId, int libraryId)
        {
            var temp = bookCopiesService.DeleteCopy(bookId, libraryId);

            if (temp == null)
            {
                return(RedirectToPage("NotFound"));
            }
            bookCopiesService.Commit();
            TempData["Message"] = "Book Copy Removed!";

            return(RedirectToPage("/Libraries/LibraryDetails", new { id = temp.LibraryId }));
        }