Skip to content

Instantly share code, notes, and snippets.

@httpmurilo
Last active May 7, 2020 02:22
Show Gist options
  • Save httpmurilo/e9f273c099042c1891eeab697a4c87df to your computer and use it in GitHub Desktop.
Save httpmurilo/e9f273c099042c1891eeab697a4c87df to your computer and use it in GitHub Desktop.
PostAutor
[HttpPost]
public IActionResult AdicionarAutor(Autor autor)
{
if(autor == null)
{
return BadRequest("Autor não foi informado no body da request");
}
_context.Add(autor);
_context.SaveChanges();
return Ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment