Example #1
0
 /// <summary>
 /// Create a new GreWordAffinity object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="word">Initial value of the Word property.</param>
 /// <param name="related">Initial value of the Related property.</param>
 /// <param name="affinity">Initial value of the Affinity property.</param>
 public static GreWordAffinity CreateGreWordAffinity(global::System.Int64 id, global::System.String word, global::System.String related, global::System.Int32 affinity)
 {
     GreWordAffinity greWordAffinity = new GreWordAffinity();
     greWordAffinity.Id = id;
     greWordAffinity.Word = word;
     greWordAffinity.Related = related;
     greWordAffinity.Affinity = affinity;
     return greWordAffinity;
 }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the GreWordAffinities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGreWordAffinities(GreWordAffinity greWordAffinity)
 {
     base.AddObject("GreWordAffinities", greWordAffinity);
 }
Example #3
0
 private void InsertAffineWord(GreWord word, GreWord affine, int affinity)
 {
     int count = (from o in _entities.GreWordAffinities
                  where o.GreWord.Word == word.Word && o.RelevantWord.Word == affine.Word
                  select o).Count();
     if (count == 0)
     {
         GreWordAffinity gwa = new GreWordAffinity()
                    {
                        GreWord = word,
                        RelevantWord = affine,
                        Affinity = affinity
                    };
         _entities.AddToGreWordAffinities(gwa);
     }
 }