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)); } }
public ActionResult Delete(string id) { _livroService.DeleteLivro(Guid.Parse(id)); return(Ok()); }