Last active
May 7, 2020 02:46
-
-
Save httpmurilo/8fd6a7e3a0a9b0061b8b826dffc4835e to your computer and use it in GitHub Desktop.
PatchAutor
This file contains 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
[HttpPatch] | |
public IActionResult AtualizarAutor(Autor autor) | |
{ | |
if(autor == null) | |
{ | |
return BadRequest("Autor não foi informado no body da request"); | |
} | |
_context.Update(autor); | |
_context.SaveChanges(); | |
return Ok(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment