Пример #1
0
 public IHttpActionResult Delete(int id)
 {
     if (repositorio.Delete(id))
     {
         return(Ok());
     }
     return(BadRequest());
 }
Пример #2
0
        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));
 }