/// <summary>
 /// Deprecated Method for adding a new object to the ArticleTexts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToArticleTexts(ArticleText articleText)
 {
     base.AddObject("ArticleTexts", articleText);
 }
Ejemplo n.º 2
0
        protected ArticleText LoadOrCreateArticleText(int selectTextType)
        {
            ArticleText anArticleText = _entityArticle.ArticleTexts
                                                        .Where(articleText => articleText.TextType == selectTextType)
                                                        .FirstOrDefault();
            if (anArticleText == null)
            {
                anArticleText = new ArticleText();
                anArticleText.ArticleId = Id.Value;
                anArticleText.TextType = selectTextType;
                anArticleText.Version = 1;
                _entityArticle.ArticleTexts.Add(anArticleText);
            }

            return anArticleText;
        }
 /// <summary>
 /// Create a new ArticleText object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="articleId">Initial value of the ArticleId property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 /// <param name="textType">Initial value of the TextType property.</param>
 /// <param name="version">Initial value of the Version property.</param>
 public static ArticleText CreateArticleText(global::System.Int64 id, global::System.Int64 articleId, global::System.String text, global::System.Int32 textType, global::System.Int32 version)
 {
     ArticleText articleText = new ArticleText();
     articleText.Id = id;
     articleText.ArticleId = articleId;
     articleText.Text = text;
     articleText.TextType = textType;
     articleText.Version = version;
     return articleText;
 }