/// <summary>
 /// Create a new WordNotInTheme object.
 /// </summary>
 /// <param name="wordNotInTheme_id">Initial value of the WordNotInTheme_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="system_InsDT">Initial value of the System_InsDT property.</param>
 public static WordNotInTheme CreateWordNotInTheme(global::System.Int64 wordNotInTheme_id, global::System.Int64 word_id, global::System.Int64 theme_id, global::System.DateTime system_InsDT)
 {
     WordNotInTheme wordNotInTheme = new WordNotInTheme();
     wordNotInTheme.WordNotInTheme_id = wordNotInTheme_id;
     wordNotInTheme.Word_id = word_id;
     wordNotInTheme.Theme_id = theme_id;
     wordNotInTheme.System_InsDT = system_InsDT;
     return wordNotInTheme;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the WordNotInTheme EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWordNotInTheme(WordNotInTheme wordNotInTheme)
 {
     base.AddObject("WordNotInTheme", wordNotInTheme);
 }
Пример #3
0
 /// <summary>Удалить слово из темы
 /// <example>DeleteWord("it", "Сухарики")</example>
 /// </summary>
 /// <returns>Вес слова в данной теме после изменения списка</returns>
 public double DeleteWord(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 wnit = new WordNotInTheme { Word_id = wordIdx, Theme_id = theme.Theme_id, System_InsDT = DateTime.Now };
     _db.WordNotInTheme.AddObject(wnit);
     _db.SaveChanges();
     if (!_wordsWeigthsInGroupsIncludingOtherGroupsRemoved.ContainsKey(stem))
         _wordsWeigthsInGroupsIncludingOtherGroupsRemoved.Add(stem, new Dictionary<string, double>());
     _wordsWeigthsInGroupsIncludingOtherGroupsRemoved[stem].Add(themeName, _wordsWeigthsInGroupsIncludingOtherGroups[stem][themeName]);
     _wordsWeigthsInGroupsIncludingOtherGroups[stem].Remove(themeName);
     return 0.0;
 }