Exemple #1
0
        public void AddResourceToReservation(AddResourceToReservationDto addResourceToReservationDto)
        {
            var office      = officeRepository.GetOfficeById(addResourceToReservationDto.OfficeId);
            var room        = office.GetRoomByNumber(addResourceToReservationDto.RoomNumber);
            var resource    = room.GetResourceByNumber(addResourceToReservationDto.ResourceNumber);
            var reservation = room.GetReservationByNumber(addResourceToReservationDto.ReservationNumber);

            reservation.AddResource(resource);
            officeRepository.AddResourceToReservation(addResourceToReservationDto.OfficeId, office.Rooms);
        }