示例#1
0
        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;
            }
        }
示例#2
0
        public void Delete(int id)
        {
            FanOutputModel fanOutput = Get(id);

            FanOutputReadings.Remove(fanOutput);
        }
示例#3
0
 public void Post([FromBody] FanOutputModel value)
 {
     value.Id = FanOutputReadings.Last().Id + 1;
     FanOutputReadings.Add(value);
 }