コード例 #1
0
        public ActionResult Delete(int id, BookAuthorViewModel model)
        {
            try
            {
                bookRepository.Delete(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }
コード例 #2
0
        public ActionResult Delete(int id, author author)
        {
            try
            {
                authorrepository.Delete(id);

                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }