예제 #1
0
 public void AddItem(Pub pub)
 {
     if (!_favourites.Any(p => p.pub.PubId == pub.PubId))
     {
         _favourites.Add(new Favourite { pub = pub });
     }
 }
예제 #2
0
 public void RemoveItem(Pub pub)
 {
     _favourites.RemoveAll(r => r.pub.PubId == pub.PubId);
 }