示例#1
0
        public bool DeleteReply(int dtid)
        {
            dongtaiCommentReply e = db.dongtaiCommentReply.Find(dtid);

            db.dongtaiCommentReply.Remove(e);
            if (db.SaveChanges() > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        public bool AddCommentReply(int id, string content, int dtid, string name)
        {
            dongtaiCommentReply dtc = new dongtaiCommentReply
            {
                UserName    = name,
                dtCommentid = id,
                Time        = DateTime.Now,
                Content     = content
            };

            db.dongtaiCommentReply.Add(dtc);
            if (db.SaveChanges() > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }