Пример #1
0
        public int InsertIntoCommentEntity(CommentInService l)
        {
            CommentMessage lm = new CommentMessage();

            lm.LogId = l.LogId;
            lm.CommentUserName = l.CommentUserName;
            lm.UserId = l.LogUserId;
            lm.TimeStamp = l.TimeStamp;
            lm.State = 0;
            lm.IsRead = 0;
            context.CommentMessages.Add(lm);
            context.SaveChanges();
            return lm.Id;
        }
Пример #2
0
        public int InsertIntoCommentEntity(CommentInService l)
        {
            CommentMessage lm = new CommentMessage();

            lm.LogId           = l.LogId;
            lm.CommentUserName = l.CommentUserName;
            lm.UserId          = l.LogUserId;
            lm.TimeStamp       = l.TimeStamp;
            lm.State           = 0;
            lm.IsRead          = 0;
            context.CommentMessages.Add(lm);
            context.SaveChanges();
            return(lm.Id);
        }