/// <summary> /// Return model containing all rooms /// </summary> /// <returns>IRoom</returns> public IRoom RetrieveAllRoom() { IEnumerable <Room> retrievedList = roomGateway.GetAllRooms(); roomTable.UpdateRoomList(retrievedList); return(roomTable); }
public Dictionary <string, Dictionary <string, dynamic> > GetRoomDetails() { var roomDetailList = new Dictionary <string, Dictionary <string, dynamic> >(); IEnumerable <Room> retrievedList = _roomGateway.GetAllRooms(); foreach (var data in retrievedList) { if (!roomDetailList.ContainsKey(data.RoomTypeDetail())) { var room = new Dictionary <string, dynamic> { { "Capacity", data.CapacityDetail() }, { "Price", data.RoomPriceDetail() } }; roomDetailList.Add(data.RoomTypeDetail(), room); } } return(roomDetailList); }