public HttpResponseMessage Create(DataSetModel model)
        {
            if (ModelState.IsValid)
            {
                var reading = new DataReading()
                {
                    SensorId = model.SensorId,
                    DateTime = DateTime.Now.AddHours(1),
                    MetaValue = model.MetaValue
                };

                _sensorDataService.Create(reading);
                SensorHub.Update(reading.SensorId, string.Format("{0:0.00}{1}", reading.MetaValue, reading.Sensor.Symbol), reading.DateTime.ToString("MMM dd, yyyy h:mmtt"));
                return Request.CreateResponse(HttpStatusCode.OK, reading);

            }

            return Request.CreateResponse(HttpStatusCode.BadRequest, "[ERROR]: Data reading could not be added because there was missing or invalid data provided.");
        }
 public void Update(DataReading dataReading)
 {
     if (!SensorExists(dataReading.SensorId)) return;
     _dataRepository.Update(dataReading);
 }
 public void Delete(DataReading dataReading)
 {
     if (!SensorExists(dataReading.SensorId)) return;
     _dataRepository.Remove(dataReading);
 }