示例#1
0
 /// <summary>
 /// 创建新的 Uto_Microblog 对象。
 /// </summary>
 /// <param name="microblogId">MicroblogId 属性的初始值。</param>
 /// <param name="userId">UserId 属性的初始值。</param>
 /// <param name="body">Body 属性的初始值。</param>
 /// <param name="dateCreated">DateCreated 属性的初始值。</param>
 /// <param name="attachmentId">AttachmentId 属性的初始值。</param>
 /// <param name="commentCount">CommentCount 属性的初始值。</param>
 /// <param name="repeatId">RepeatId 属性的初始值。</param>
 /// <param name="repeatCount">RepeatCount 属性的初始值。</param>
 public static Uto_Microblog CreateUto_Microblog(global::System.Int64 microblogId, global::System.Int64 userId, global::System.String body, global::System.DateTime dateCreated, global::System.Int64 attachmentId, global::System.Int64 commentCount, global::System.Int64 repeatId, global::System.Int64 repeatCount)
 {
     Uto_Microblog uto_Microblog = new Uto_Microblog();
     uto_Microblog.MicroblogId = microblogId;
     uto_Microblog.UserId = userId;
     uto_Microblog.Body = body;
     uto_Microblog.DateCreated = dateCreated;
     uto_Microblog.AttachmentId = attachmentId;
     uto_Microblog.CommentCount = commentCount;
     uto_Microblog.RepeatId = repeatId;
     uto_Microblog.RepeatCount = repeatCount;
     return uto_Microblog;
 }
示例#2
0
        public ActionResult RepeatMyWord(string repeatContent,long microblogId)
        {
            //原始微博转发数+1
            Uto_Microblog oriMicroblog = utopiaService.GetMicroBlogById(microblogId);
            oriMicroblog.RepeatCount++;
            utopiaService.UpdateMicroBlog(oriMicroblog);

            //产生新的转发微博
            Uto_Microblog microblog = new Uto_Microblog();
            microblog.Body = oriMicroblog.Body;
            microblog.DateCreated = DateTime.Now;
            microblog.RepeatId = oriMicroblog.RepeatId > 0 ? oriMicroblog.RepeatId : microblogId;
            microblog.UserId = UserContext.CurrentUser.UserId;
            microblog.RepeatContent = repeatContent;
            microblog.AttachmentId = 0;
            utopiaService.PublishMicroBlog(microblog);

            return Json(1);
        }
示例#3
0
 /// <summary>
 /// 用于向 Uto_Microblog EntitySet 添加新对象的方法,已弃用。请考虑改用关联的 ObjectSet&lt;T&gt; 属性的 .Add 方法。
 /// </summary>
 public void AddToUto_Microblog(Uto_Microblog uto_Microblog)
 {
     base.AddObject("Uto_Microblog", uto_Microblog);
 }