public IActionResult Delete(int id) { if (id < 1) { return(NotFound()); } _service.Delete(id); return(RedirectToAction("Index")); }
public async Task <ActionResult <Autor> > Delete(int id) { Autor autor = await _autoresService.Delete(id); if (autor == null) { return(NotFound()); } return(autor); }
public IActionResult Delete(int id) { return(Ok( _AutoresService.Delete(id) )); }