コード例 #1
0
        public void Seed()
        {
            var dictionaryFilePath = _appConfig
                                     .GetConfiguration()["DictionaryFilePath"];

            var dictionaryData = _wordLoader
                                 .LoadFromFile(dictionaryFilePath)
                                 .DistinctBy(dd => dd.Text.ToLower().Trim())
                                 .OrderBy(dd => dd.Text)
                                 .ToArray();

            _wordsRepository.AddWords(dictionaryData);
        }