// GET: SensorReading
        public ActionResult Index()
        {
            var model = _doorSwitch.GetReadings();

            return(View(model));
        }
 // GET: api/DoorSwitch
 public IEnumerable <DoorSwitchDTO> Get()
 {
     return(_doorSwitch.GetReadings());
 }