public async Task <ActionResult> Delete(Guid id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try
            {
                return(Ok(await _livroService.DeleteLivro(id)));
            }
            catch (ArgumentException e)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, e.Message));
            }
        }
Exemplo n.º 2
0
 public ActionResult Delete(string id)
 {
     _livroService.DeleteLivro(Guid.Parse(id));
     return(Ok());
 }