Пример #1
0
 public IHttpActionResult Post(int id, Movie changes) {
     var dbMovie = _movies.First(x => x.Id == id);
     dbMovie.Id = changes.Id;
     dbMovie.Title = changes.Title;
     dbMovie.Genre = changes.Genre;
     dbMovie.ReleaseDate = changes.ReleaseDate;
     return Ok();
 }
Пример #2
0
 //POST:
 //returns a status quo instead of void
 public IHttpActionResult Post(Movie newMovie) {
     _movies.Add(newMovie);
     return Ok(); 
 }