public Object GetAllDataByRoom()
        {
            var ds = repository.getAll();
            var cs = repositoryCS.getAll();
            var s  = repositoryS.getAll();
            var tv = repositoryTV.getAll();


            //var result = ds.Where(x=>x.Controllersensor.Controller.)
            return(null);
        }
Beispiel #2
0
        public Object GetControllerSensorStateByRoom(string room)
        {
            //var controller = repositoryC.getAll();
            var sensor = repositoryS.getAll();

            var result = repository.getAll().Where(x => x.Room == room).Select(s => new
            {
                room       = s.Room,
                sensorName = s.Sensors.Sensorname,
                mac        = s.Sensors.Mac,
                // controllerName = s.Controller.Controllername,
                dateInstall = s.DateInstall,
                state       = s.State
            }).FirstOrDefault();

            return(result);
        }