public void AddRoom(Room room) { if (ReservationRooms.Any(x => x.Room == room)) { throw new HotelException($"Pokój {room} już istnieje w tej rezerwacji."); } var reservationRoom = new ReservationRoom(this, room); ReservationRooms.Add(reservationRoom); }
public bool IsRoomInReservation(Room room) => ReservationRooms.Any(x => x.Room.Id == room.Id);