示例#1
0
文件: Mall.cs 项目: wjk-lovely/JiaoZi
        //发表评论 实验代码  可删除
        public void BbookComments(int UserID, int BookID, string Comment_Content, DateTime dateTime)
        {
            var bookComment = new BookComment()
            {
                UserID          = UserID,
                BookID          = BookID,
                Comment_Content = Comment_Content,
                Comment_Time    = dateTime
            };

            db.BookComment.Add(bookComment);
            db.SaveChanges();
        }
示例#2
0
文件: Mall.cs 项目: wjk-lovely/JiaoZi
 //发表评论 正式代码
 public void AddComment(BookComment comment)
 {
     db.BookComment.Add(comment);
     db.SaveChanges();
 }