public bool DeleteReply(int dtid) { dongtaiCommentReply e = db.dongtaiCommentReply.Find(dtid); db.dongtaiCommentReply.Remove(e); if (db.SaveChanges() > 0) { return(true); } else { return(false); } }
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); } }