public BasewordViewModel(Baseword baseword) { Id = baseword.Id; Text = baseword.Text; Language = (Enums.Language) baseword.LanguageId; Wordtype = new WordtypeViewModel(baseword.Wordtype); Comment = baseword.Comment; }
public BasewordViewModel(Baseword baseword) { Id = baseword.Id; Text = baseword.Text; Language = ApplicationViewModel.Instance.GetLanguageById(baseword.LanguageId); Wordtype = ApplicationViewModel.Instance.GetWordtypeById(baseword.WordtypeId); Comment = baseword.Comment; IsLocked = baseword.IsLocked.GetValueOrDefault(); }
/// <summary> /// Create a new Baseword object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="languageId">Initial value of the LanguageId property.</param> /// <param name="wordtypeId">Initial value of the WordtypeId property.</param> /// <param name="text">Initial value of the Text property.</param> /// <param name="referenceNumber">Initial value of the ReferenceNumber property.</param> public static Baseword CreateBaseword(global::System.Int32 id, global::System.Int32 languageId, global::System.Int32 wordtypeId, global::System.String text, global::System.Int64 referenceNumber) { Baseword baseword = new Baseword(); baseword.Id = id; baseword.LanguageId = languageId; baseword.WordtypeId = wordtypeId; baseword.Text = text; baseword.ReferenceNumber = referenceNumber; return baseword; }
/// <summary> /// Deprecated Method for adding a new object to the Basewords1 EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToBasewords1(Baseword baseword) { base.AddObject("Basewords1", baseword); }