public void Put(int id, [FromBody] FanOutputModel value) { FanOutputModel fanOutput = Get(id); if (fanOutput != null) { fanOutput.Name = value.Name; fanOutput.Temp = value.Temp; fanOutput.Humidity = value.Humidity; } }
public void Delete(int id) { FanOutputModel fanOutput = Get(id); FanOutputReadings.Remove(fanOutput); }
public void Post([FromBody] FanOutputModel value) { value.Id = FanOutputReadings.Last().Id + 1; FanOutputReadings.Add(value); }