Пример #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);
        }