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