Beispiel #1
0
        public IActionResult OnPostDoorAction(string data)
        {
            var device = new IoTService(serviceConnStr);

            switch (data)
            {
            case "up":
                device.DoorUp();
                break;

            case "down":
                device.DoorDown();
                break;

            case "stop":
                device.DoorStop();
                break;

            default:
                return(BadRequest());
            }

            return(Page());
        }
Beispiel #2
0
        public void DoorDown()
        {
            var iotService = new IoTService(ConnStr);

            iotService.DoorDown();
        }