/// <summary> /// Create a new WordInTheme object. /// </summary> /// <param name="wordInTheme_id">Initial value of the WordInTheme_id property.</param> /// <param name="wordInTheme_isLexicalizedWord">Initial value of the WordInTheme_isLexicalizedWord property.</param> /// <param name="word_id">Initial value of the Word_id property.</param> /// <param name="theme_id">Initial value of the Theme_id property.</param> /// <param name="system_InsDT">Initial value of the System_InsDT property.</param> public static WordInTheme CreateWordInTheme(global::System.Int64 wordInTheme_id, global::System.Boolean wordInTheme_isLexicalizedWord, global::System.Int64 word_id, global::System.Int64 theme_id, global::System.DateTime system_InsDT) { WordInTheme wordInTheme = new WordInTheme(); wordInTheme.WordInTheme_id = wordInTheme_id; wordInTheme.WordInTheme_isLexicalizedWord = wordInTheme_isLexicalizedWord; wordInTheme.Word_id = word_id; wordInTheme.Theme_id = theme_id; wordInTheme.System_InsDT = system_InsDT; return wordInTheme; }
/// <summary> /// Deprecated Method for adding a new object to the WordInTheme EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToWordInTheme(WordInTheme wordInTheme) { base.AddObject("WordInTheme", wordInTheme); }
/// <summary>Вставка слова в список слов относящихся к теме /// </summary> /// <param name="lexicalizedWord">Является ли слово словарным</param> /// <returns>Вес слова в данной теме после изменения списка</returns> private double AddWord(string themeGroupName, string themeName, string stem, bool lexicalizedWord) { var wordIdx = MergeWord(stem); _themeGroupId = _db.ThemeGroup.Single(tg => tg.ThemeGroup_name == themeGroupName).ThemeGroup_id; var theme = _db.Theme.Single(t => t.Theme_name == themeName && t.ThemeGroup_id == _themeGroupId); DeleteWordFromAllList(themeGroupName, themeName, stem); var wordInTheme = new WordInTheme { Word_id = wordIdx, WordInTheme_isLexicalizedWord = lexicalizedWord, System_InsDT = DateTime.Now, Theme_id = theme.Theme_id }; _db.WordInTheme.AddObject(wordInTheme); _db.SaveChanges(); _wordsWeigthsInGroupsIncludingOtherGroups[stem][themeName] += lexicalizedWord ? AdditionalDictionaryWeight : AdditionalWeight; return _wordsWeigthsInGroupsIncludingOtherGroups[stem][themeName]; }