Example #1
0
        public async Task <SensorInfo> GetSensorById(string sensorId, string ownerEmail)
        {
            SensorTableInfo sensor = new SensorTableInfo(sensorId, ownerEmail);

            sensor = await Get(_sensorTable, sensor);

            return(_mapper.Map <SensorInfo>(sensor));
        }
Example #2
0
        public Task <bool> SensorExists(SensorInfo sensor)
        {
            SensorTableInfo tableSensor = _mapper.Map <SensorTableInfo>(sensor);

            return(Exists(_sensorTable, tableSensor));
        }
Example #3
0
        public Task <bool> SaveNewSensor(SensorInfo sensor)
        {
            SensorTableInfo tableSensor = _mapper.Map <SensorTableInfo>(sensor);

            return(Insert(_sensorTable, tableSensor));
        }