public void AddEntry(WeatherEntry entry)
 {
     var cmd = new SqlCommand(@"Insert Into WeatherEntries (Temperature, Humidity, Pressure, RainGauge, SoilMoisture, SoilTemperature, TimeStamp, WindDirection, WindSpeed) Values (@Temperature, @Humidity, @Pressure, @RainGauge, @SoilMoisture, @SoilTemperature, @TimeStamp, @WindDirection, @WindSpeed)", new SqlConnection(_connectionString));
     cmd.Parameters.Add(new SqlParameter("@Temperature", entry.Temperature));
     cmd.Parameters.Add(new SqlParameter("@Humidity", entry.Humidity));
     cmd.Parameters.Add(new SqlParameter("@Pressure", entry.Pressure));
     cmd.Parameters.Add(new SqlParameter("@RainGauge", entry.RainGauge));
     cmd.Parameters.Add(new SqlParameter("@SoilMoisture", entry.SoilMoisture));
     cmd.Parameters.Add(new SqlParameter("@SoilTemperature", entry.SoilTemperature));
     cmd.Parameters.Add(new SqlParameter("@TimeStamp", entry.TimeStamp));
     cmd.Parameters.Add(new SqlParameter("@WindDirection", entry.WindDirection));
     cmd.Parameters.Add(new SqlParameter("@WindSpeed", entry.WindSpeed));
     cmd.Connection.Open();
     cmd.ExecuteNonQuery();
     cmd.Connection.Close();
 }
 public void AddEntry(WeatherEntry entry)
 {
     var entries = JsonConvert.DeserializeObject<List<WeatherEntry>>(File.ReadAllText(_dataPath));
     entries.Add(entry);
     File.WriteAllText(_dataPath, JsonConvert.SerializeObject(entries));
 }