예제 #1
0
 public Task <bool> SaveSensorsData(SensorBatchData data)
 {
     return(Task.Run(() =>
     {
         var trackNumber = _packageStore.GetObjectsProperties(p => p.DeviceKey == data.DeviceKey, p => p.TrackNumber).Last();
         data.TrackNumber = trackNumber;
         _sensorBatchDataStore.Add(data);
         return true;
     }));
 }
예제 #2
0
 public Task <string> CreatePackage(PackageInfo info)
 {
     return(Task.Run(() =>
     {
         var trackNumber = Guid.NewGuid().ToString();
         info.TrackNumber = trackNumber;
         _packageStore.Add(info);
         return trackNumber;
     }));
 }
예제 #3
0
        public string CreateDevice([FromBody] Device device)
        {
            _deviceStore.Add(device);

            return(device.DeviceKey);
        }