Beispiel #1
0
        bool IKongjian.deleteattention(int id)
        {
            Attention attention = db.Attention.Where(b => b.AttentionID == id).FirstOrDefault();

            if (attention != null)
            {
                db.Attention.Remove(attention);
                db.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #2
0
 //添加关注
 void IKongjian.addattention(Attention attention)
 {
     db.Attention.Add(attention);
     db.SaveChanges();
 }