예제 #1
0
        public OperationResult<MovieFormat> AddMovieFormat(MovieFormat movieFormat)
        {
            if (_movieFormatRepository.GetSingleByAbbreviation(movieFormat.Abbreviation) != null)
            {
                return new OperationResult<MovieFormat>(false);
            }

            movieFormat.Key = Guid.NewGuid();
            _movieFormatRepository.Add(movieFormat);
            _movieFormatRepository.Save();

            return new OperationResult<MovieFormat>(true) { Entity = movieFormat };
        }
예제 #2
0
        public MovieFormat UpdateMovieFormat(MovieFormat movieFormat)
        {
            _movieFormatRepository.Edit(movieFormat);
            _movieGenreRepository.Save();

            return movieFormat;
        }