public IHttpActionResult Delete(int id) { if (repositorio.Delete(id)) { return(Ok()); } return(BadRequest()); }
public async Task <ActionResult <Autor> > DeleteAutor(int id) { try { var autor = _contextoAutor.GetId(id); if (autor == null) { return(NotFound()); } _contextoAutor.Delete(autor); return(autor); } catch (Exception ex) { return(NotFound(ex.InnerException.Message)); } }
public async Task <bool> Excluir(Guid id) { return(await _repositorioAutores.Delete(id)); }