Пример #1
0
 public void AddFriend(string user, string newFriend)
 {
     using (TempDBFriendListContext db = new TempDBFriendListContext())
     {
         db.Friends.Add(new Friend() { User = user, Friend1 = newFriend });
         db.SaveChanges();
     }
 }
Пример #2
0
 public void RemoveFriend(string user, string friend)
 {
     using (TempDBFriendListContext db = new TempDBFriendListContext())
     {
         db.Friends.Remove(new Friend() { User = user, Friend1 = friend });
         db.SaveChanges();
     }
 }