public void RemoveQuestionFromHistory(int userId, int linkPostId)
 {
     using (var db = new StackoverflowContext())
     {
         db.History.Remove(GetHistoryItem(userId, linkPostId));
         db.SaveChanges();
     }
 }
 public void AddQuestionToHistory(int userId, int postId)
 {
     using (var db = new StackoverflowContext())
     {
         db.History.Add(new History(userId, postId));
         db.SaveChanges();
     }
 }
Beispiel #3
0
 public void AddQuestionToHistory(int userId, int postId)
 {
     _db.History.Add(new History(userId, postId));
     _db.SaveChanges();
 }