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);
        }
Ejemplo n.º 3
0
 public IActionResult Delete(int id)
 {
     return(Ok(
                _AutoresService.Delete(id)
                ));
 }