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 }; }
public MovieFormat UpdateMovieFormat(MovieFormat movieFormat) { _movieFormatRepository.Edit(movieFormat); _movieGenreRepository.Save(); return movieFormat; }