public OperationResult<UserTvEpisode> AddUserTvEpisode(UserTvEpisode userEpisode) { if(GetUserTvEpisode(userEpisode.TvEpisodeKey, userEpisode.OwnerKey) != null) { return new OperationResult<UserTvEpisode>(false); } userEpisode.Key = Guid.NewGuid(); _userTvEpisodeRepository.Add(userEpisode); _userTvEpisodeRepository.Save(); return new OperationResult<UserTvEpisode>(true) {Entity = userEpisode}; }
public UserTvEpisode UpdateUserTvEpisode(UserTvEpisode userEpisode) { _userTvEpisodeRepository.Edit(userEpisode); _userTvEpisodeRepository.Save(); return userEpisode; }