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(); }
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(); }
public Phrase SavePhrase(Phrase p) { TweetDAL dal = new TweetDAL(); dal.Phrases.Add(p); dal.SaveChanges(); return p; }