/// <summary> /// Create a new WordCandidatesInTheme object. /// </summary> /// <param name="wordCandidatesInTheme_id">Initial value of the WordCandidatesInTheme_id 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="wordCandidatesInTheme_Visible">Initial value of the WordCandidatesInTheme_Visible property.</param> /// <param name="system_InsDT">Initial value of the System_InsDT property.</param> public static WordCandidatesInTheme CreateWordCandidatesInTheme(global::System.Int64 wordCandidatesInTheme_id, global::System.Int64 word_id, global::System.Int64 theme_id, global::System.Boolean wordCandidatesInTheme_Visible, global::System.DateTime system_InsDT) { WordCandidatesInTheme wordCandidatesInTheme = new WordCandidatesInTheme(); wordCandidatesInTheme.WordCandidatesInTheme_id = wordCandidatesInTheme_id; wordCandidatesInTheme.Word_id = word_id; wordCandidatesInTheme.Theme_id = theme_id; wordCandidatesInTheme.WordCandidatesInTheme_Visible = wordCandidatesInTheme_Visible; wordCandidatesInTheme.System_InsDT = system_InsDT; return wordCandidatesInTheme; }
/// <summary> /// Deprecated Method for adding a new object to the WordCandidatesInTheme EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToWordCandidatesInTheme(WordCandidatesInTheme wordCandidatesInTheme) { base.AddObject("WordCandidatesInTheme", wordCandidatesInTheme); }
/// <summary>Слово не будет иметь повышенный вес в рамках данной темы /// <example>IgnoreWord("it", "Блок") //мб системный блок, хотя хз</example> /// </summary> /// <returns>Вес слова в данной теме после изменения списка</returns> public double IgnoreWord(string themeGroupName, string themeName, string stem) { 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 wordCandidate = new WordCandidatesInTheme { Word_id = wordIdx, Theme_id = theme.Theme_id, System_InsDT = DateTime.Now, WordCandidatesInTheme_Visible = false }; _db.WordCandidatesInTheme.AddObject(wordCandidate); _db.SaveChanges(); return _wordsWeigthsInGroupsIncludingOtherGroups[stem][themeName]; }