예제 #1
0
 public void UpdatePhrase(Phrase p)
 {
     TweetDAL dal = new TweetDAL();
     Phrase ph = dal.Phrases.Where(x => x.PhraseID == p.PhraseID).FirstOrDefault();
     ph.phrase = p.phrase;
     dal.SaveChanges();
 }
예제 #2
0
 internal void DeletePhraseByID(int pID)
 {
     TweetDAL dal = new TweetDAL();
     Phrase ph = dal.Phrases.Where(x => x.PhraseID == pID).FirstOrDefault();
     dal.Phrases.Remove(ph);
     dal.SaveChanges();
 }
예제 #3
0
 public Phrase SavePhrase(Phrase p)
 {
     TweetDAL dal = new TweetDAL();
     dal.Phrases.Add(p);
     dal.SaveChanges();
     return p;
 }