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; }
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); }