Created
May 7, 2020 02:32
-
-
Save httpmurilo/4117ecaa676460cf6d591c9ddce0ab3e to your computer and use it in GitHub Desktop.
Delete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpDelete] | |
public IActionResult DeletarAutor(Autor autor) | |
{ | |
if(autor == null) | |
{ | |
return BadRequest("Autor não foi informado no body da request"); | |
} | |
_context.Remove(autor); | |
_context.SaveChanges(); | |
return Ok(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment