public void RegisterUser(Member user) { if (!IsOpen) { return; } if (AvailableRegistrationSpots <= 0) { return; } SessionRegistrees registration = new SessionRegistrees(this, user); SessionRegistrees.Add(registration); user.SessionRegistrees.Add(registration); }
public void UnregisterUser(Member user) { SessionRegistrees.Remove(SessionRegistrees.FirstOrDefault(r => r.MemberId == user.MemberId)); user.SessionRegistrees.Remove(user.SessionRegistrees.FirstOrDefault(r => r.MemberId == user.MemberId)); }