Beispiel #1
0
        public OperationResult<UserMovie> AddUserMovie(UserMovie userMovie)
        {
            if(GetUserMovie(userMovie.MovieKey, userMovie.OwnerKey) != null)
            {
                return new OperationResult<UserMovie>(false);
            }

            userMovie.Key = Guid.NewGuid();
            _userMovieRepository.Add(userMovie);
            _userMovieRepository.Save();

            return new OperationResult<UserMovie>(true) {Entity = userMovie};
        }
Beispiel #2
0
        public UserMovie UpdateUserMovie(UserMovie userMovie)
        {
            _userMovieRepository.Edit(userMovie);
            _userMovieRepository.Save();

            return userMovie;
        }