public void Post([FromBody] Record rec) { Db.Save(rec); var source = Db.GetSource(rec.SourceId); if (source.Outside == false) { Thermostat.AdjustTemperature(source.Id); } }