public async Task <IActionResult> GetDeviceById(int deviceId) { Device device = await _deviceLogic.FindAsync(deviceId); if (device == null) { return(NoContent()); } return(Ok(device)); }