public BookedRoomEntity(Booking booking, Room room) { _room = room; _appliedPackEntities = new List<AppliedPackEntity>(); foreach(AppliedPack appliedPack in booking.RoomPacks) { if(appliedPack.Room.Id == _room.Id) { _appliedPackEntities.Add(new AppliedPackEntity(appliedPack)); } } }
public RoomEntity(Room room) { _pcs = new PropertyChangeSupport(this); _room = room; }
private static async Task<Room> _getReplacementRoom(ResotelContext ctx, Room unavailableRoom) { return await _getRoomRequest(ctx, false) .FirstOrDefaultAsync(room => room.Kind == unavailableRoom.Kind); }
private static void _replaceRoom(Booking booking, Room unavailableRoom, Room replacementRoom) { booking.Rooms.Add(replacementRoom); booking.Rooms.Remove(unavailableRoom); }