public ActionResult <WatchedMovieModel> Update([FromBody] UpdateWatchedMovieModel movie, string movieId) { var movieToReturn = facadeWatchedMovies.UpdateWatchedMovie(movie, movieId, CurrentUser.Id); var links = CreateLinksForMovie(CurrentUser.Id, movieToReturn.Id); return(generateResult(movieToReturn, links)); }
public static WatchedMovie MapUpdate(UpdateWatchedMovieModel updateModel) { return(new WatchedMovie { Comment = updateModel.Comment, Rating = updateModel.Rate, WatchingDate = updateModel.DateTimeWatched }); }
public WatchedMovieModel UpdateWatchedMovie(UpdateWatchedMovieModel movieModel, string movieId, long currentUserid) { var updatedMovie = WatchedMoviesManager.Update(Mapper.Mapper.MapUpdate(movieModel), movieId, currentUserid); return(Mapper.Mapper.Map(updatedMovie)); }