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; })); }
public Task <string> CreatePackage(PackageInfo info) { return(Task.Run(() => { var trackNumber = Guid.NewGuid().ToString(); info.TrackNumber = trackNumber; _packageStore.Add(info); return trackNumber; })); }
public string CreateDevice([FromBody] Device device) { _deviceStore.Add(device); return(device.DeviceKey); }