public ActionResult GetRoomSchedules(int roomId) { try { List<Examination> allExamination = (List<Examination>)_examinationService.GetExaminationsForPeriodAndRoom(DateTime.Now, DateTime.Now.AddDays(30), roomId); List<EquipmentTransfer> allEquipmentTransfers = (List<EquipmentTransfer>)_equipmentTransferService.GetEquipmentTransfersByRoomNumberAndPeriod(DateTime.Now, DateTime.Now.AddDays(30), roomId); List<BaseRenovation> allRenovation = (List<BaseRenovation>)_renovationService.GetRenovationForPeriodByRoomNumber(DateTime.Now, DateTime.Now.AddDays(30), roomId); List<RoomSchedulesDTO> roomSchedulesDTOs = new List<RoomSchedulesDTO>(); allExamination.ForEach(e => roomSchedulesDTOs.Add(RoomSchedulesMapper.Examination_To_RoomSchedulesDTO(e))); allEquipmentTransfers.ForEach(e => roomSchedulesDTOs.Add(RoomSchedulesMapper.EquipmentTransfer_To_RoomSchedulesDTO(e))); allRenovation.ForEach(e => roomSchedulesDTOs.Add(RoomSchedulesMapper.Renovation_To_RoomSchedulesDTO(e))); return Ok(roomSchedulesDTOs); } catch (NotFoundException exception) { return NotFound(exception.Message); } }