Esempio n. 1
0
 public WordViewModel(Word word)
 {
     this.Word = word.Word1;
     this.Definition = word.Definition;
     if (word.Example != null && word.Example != string.Empty)
     {
         this.Example = word.Example;
     }
     else
     {
         this.Example = string.Empty;
     }
     this.DictionaryId = word.DictionaryId;
     this.WordId = word.Id;
 }
 /// <summary>
 /// Create a new Word object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="word1">Initial value of the Word1 property.</param>
 /// <param name="definition">Initial value of the Definition property.</param>
 /// <param name="dictionaryId">Initial value of the DictionaryId property.</param>
 public static Word CreateWord(global::System.Int32 id, global::System.String word1, global::System.String definition, global::System.Int32 dictionaryId)
 {
     Word word = new Word();
     word.Id = id;
     word.Word1 = word1;
     word.Definition = definition;
     word.DictionaryId = dictionaryId;
     return word;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Words EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWords(Word word)
 {
     base.AddObject("Words", word);
 }