Exemplo n.º 1
0
 public void UpdateMovie(int movieId, [FromBody] MovieViewModel movieVm)
 {
     if (MovieValidator.IsValid(movieVm))
     {
         _moviesHandler.Update(movieId, movieVm);
     }
     else
     {
         Request.HttpContext.Response.StatusCode = 400;
     }
 }
Exemplo n.º 2
0
 public void AddMovie([FromBody] MovieViewModel movieVm)
 {
     if (MovieValidator.IsValid(movieVm))
     {
         _moviesHandler.Add(movieVm);
     }
     else
     {
         Request.HttpContext.Response.StatusCode = 400;
     }
 }