예제 #1
0
        public IActionResult Get()
        {
            List <string> result = new List <string>();

            using (DeviceClient client = new DeviceClient())
            {
                result = client.GetAllPrinters();
            }
            return(Ok(result));
        }
예제 #2
0
        public IActionResult Devices()
        {
            DeviceViewModel result = new DeviceViewModel();

            using (DeviceClient client = new DeviceClient())
            {
                result.Printers = client.GetAllPrinters();
                result.Scanners = client.GetAllScanners();
            }

            return(View(result));
        }