示例#1
0
        public IActionResult DeleteAuthor(Guid id)
        {
            if (!_authorService.AuthorExists(id))
            {
                return(NotFound());
            }

            if (!_authorService.Remove(id))
            {
                throw new Exception($"Deleting the author {id} failed on save");
            }

            return(NoContent());
        }
示例#2
0
 public ActionResult DeleteConfirmed(Int32 id)
 {
     _AuthorAppService.Remove(id);
     return(RedirectToAction("GetAll"));
 }