Пример #1
0
        bool IShuoshuocomment.deletecomment(int commentid)
        {
            ShuoshuoComment shuoshuocomment = db.ShuoshuoComment.Where(b => b.ShuoshuoCommentID == commentid).FirstOrDefault();

            if (shuoshuocomment != null)
            {
                db.ShuoshuoComment.Remove(shuoshuocomment);
                db.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 void IShuoshuocomment.addshuocomment(ShuoshuoComment shuoshuocomment)
 {
     db.ShuoshuoComment.Add(shuoshuocomment);
     db.SaveChanges();
 }