Ejemplo n.º 1
0
        public bool SaveWordsNewlyAddedInAdminPanel(List <WordPairForDataGridView> addedWordPairsForDataGridView,
                                                    DateTime modificationTime)
        {
            IEnumerable <WordPair> addedWordPairs = addedWordPairsForDataGridView.Select(MapToDataGridViewStructure);

            addedWordPairs = addedWordPairs.Select(w => PrepareAddedWords(w, modificationTime));

            int addedWordPairsCount = _wordsRepository.InsertMultipleWordPairs(addedWordPairs);

            return(addedWordPairsCount == addedWordPairsForDataGridView.Count);
        }