public IEnumerable<Room> GetRooms() { var collection = GetRoomsCollection(); if (collection == null) { yield break; } var rooms = collection.Items(); foreach (var room in rooms.Select(x => x.Value)) { yield return room; } }