Exemplo n.º 1
0
        /// <summary>
        /// 创建新的 tArticle 对象。
        /// </summary>
        /// <param name="id">Id 属性的初始值。</param>
        /// <param name="title">Title 属性的初始值。</param>
        /// <param name="author">Author 属性的初始值。</param>
        /// <param name="body">Body 属性的初始值。</param>
        /// <param name="addTime">AddTime 属性的初始值。</param>
        /// <param name="readCount">ReadCount 属性的初始值。</param>
        /// <param name="upCount">UpCount 属性的初始值。</param>
        /// <param name="downCount">DownCount 属性的初始值。</param>
        /// <param name="state">State 属性的初始值。</param>
        public static tArticle CreatetArticle(global::System.Int32 id, global::System.String title, global::System.String author, global::System.String body, global::System.DateTime addTime, global::System.Int32 readCount, global::System.Int32 upCount, global::System.Int32 downCount, global::System.Int32 state)
        {
            tArticle tArticle = new tArticle();

            tArticle.Id        = id;
            tArticle.Title     = title;
            tArticle.Author    = author;
            tArticle.Body      = body;
            tArticle.AddTime   = addTime;
            tArticle.ReadCount = readCount;
            tArticle.UpCount   = upCount;
            tArticle.DownCount = downCount;
            tArticle.State     = state;
            return(tArticle);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 用于向 tArticles EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddTotArticles(tArticle tArticle)
 {
     base.AddObject("tArticles", tArticle);
 }