Beispiel #1
0
        public void AddResourceToRoom(AddResourceToRoomDto addResourceToRoomDto)
        {
            var office   = officeRepository.GetOfficeById(addResourceToRoomDto.OfficeId);
            var room     = office.GetRoomByNumber(addResourceToRoomDto.RoomNumber);
            var resource = new Resource(addResourceToRoomDto.Name, addResourceToRoomDto.CanMove, addResourceToRoomDto.ResourceType);

            room.AddResource(resource);
            officeRepository.AddResourceToRoom(addResourceToRoomDto.OfficeId, office.Rooms);
        }
Beispiel #2
0
 public IActionResult Post(AddResourceToRoomDto value)
 {
     officeAppService.AddResourceToRoom(value);
     return(Ok());
 }