Beispiel #1
0
 public void RemoveInterested(Event @event)
 {
     if (!Interests.Any(ui => ui.EventId == @event.EventId))
     {
         throw new Exception("Event not in 'Interested'");
     }
     else
     {
         UserInterested userInterested = Interests.SingleOrDefault(ui => ui.EventId == @event.EventId);
         Interests.Remove(userInterested);
     }
 }
Beispiel #2
0
 public void AddGoing(Event @event)
 {
     if (Goings.Any(ug => ug.EventId == @event.EventId))
     {
         throw new Exception("Event already in 'Going'");
     }
     else if (Interests.Any(ui => ui.EventId == @event.EventId))
     {
         UserInterested userInterested = Interests.SingleOrDefault(ui => ui.EventId == @event.EventId);
         Interests.Remove(userInterested);
         UserGoing userGoing = new UserGoing(this, @event);
         Goings.Add(userGoing);
     }
     else
     {
         UserGoing userGoing = new UserGoing(this, @event);
         Goings.Add(userGoing);
     }
 }
Beispiel #3
0
        public async Task RemoveInterest(InterestItem item)
        {
            await FirebaseDbConnection.RemoveInterest(item);

            Interests.Remove(item);
        }
Beispiel #4
0
 public virtual void RemoveInterest(Interest interest)
 {
     interest.Users.Remove(this);
     Interests.Remove(interest);
 }
Beispiel #5
0
 public void RemoveInterests(string newInterest) => Interests.Remove(newInterest);