public void AddData(int DeviceId, int ValueA, int ValueB, int ValueC, int ValueD) { var x = new DeviceData { DeviceID = DeviceId, ValueA = ValueA, ValueB = ValueB, ValueC = ValueC, ValueD = ValueD, CreatedDateTime = DateTime.Now.ToString() }; var y = new MongoLayer("Devices", "test"); y.Add(x); //return false; }
public void Add(Models.DeviceData data) { var x = new DeviceData { DeviceID = data.DeviceID, ValueA = data.ValueA, ValueB = data.ValueB, ValueC = data.ValueC, ValueD = data.ValueD, CreatedDateTime = DateTime.Now.ToString() }; var y = new MongoLayer("Devices", "test"); y.Add(x); //return false; }
public List <string> DeviceList(string customerId) { var y = new MongoLayer("Devices", "test"); return(y.GetDeviceList(customerId)); }
public List <DeviceData> DeviceData(int id) { var y = new MongoLayer("Devices", "test"); return(y.GetData(id.ToString())); }