Exemplo n.º 1
0
 public IActionResult Post([FromBody] Movie movie)
 {
     if (ModelState.IsValid)
     {
         _movieData.Create(movie);
         return(CreatedAtAction("Get", new { id = movie.Id }));
     }
     return(HttpBadRequest(ModelState));
 }