Exemplo n.º 1
0
        public bool TryGetPollForRoom(int roomId, out RoomPoll roomPoll)
        {
            roomPoll = null;
            if (_polls.Count(x => x.Value.RoomId == roomId) == 0)
            {
                return(false);
            }

            return(_polls.TryGetValue(_polls.FirstOrDefault(x => x.Value.RoomId == roomId).Value.Id, out roomPoll));
        }
Exemplo n.º 2
0
        public bool TryGetPollForHotel(int id, out RoomPoll hotelPoll)
        {
            hotelPoll = null;
            if (_polls.Count(x => x.Value.Id == id) == 0)
            {
                return(false);
            }

            return(_polls.TryGetValue(_polls.FirstOrDefault(x => x.Value.Id == id).Value.Id, out hotelPoll));
        }
Exemplo n.º 3
0
 public bool TryGetPoll(int pollId, out RoomPoll roomPoll)
 {
     return(_polls.TryGetValue(pollId, out roomPoll));
 }