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); }
public IActionResult Post(AddResourceToRoomDto value) { officeAppService.AddResourceToRoom(value); return(Ok()); }