示例#1
0
        /// <summary>
        /// Creates a phrase
        /// </summary>
        /// <param name="configuration">The phrase configuration</param>
        /// <returns>The phrase created</returns>
        public RegisteredPhrase CreatePhrase
        (
            RegisteredPhraseConfiguration configuration
        )
        {
            EnsurePhraseAvailable(configuration);

            var phrase = new RegisteredPhrase
                         (
                configuration
                         );

            _phraseRepository.AddPhrase(phrase);
            _unitOfWork.SaveChanges();

            RegisteredPhraseTranslatorFactory.ClearCache();

            return(phrase);
        }