Ejemplo n.º 1
0
        public void PutACState(int id, ACStateDTO acState)
        {
            Car car = _carService.GetCar(id);

            car.ClimaTemperature   = acState.ACTemp;
            car.InsideTemperature  = acState.InsideTemp;
            car.OutsideTemperature = acState.OutsideTemp;
            car.HotChairLevel      = acState.HotChairLevel;
            car.IsClimaOn          = acState.IsACOn;

            _context.Entry(car).State = EntityState.Modified;
            _context.SaveChanges();
        }
Ejemplo n.º 2
0
        public void PutLockState(int id, CarPartStateDTO State)
        {
            Car car = _carService.GetCar(id);

            car.AreDoorsBlocked  = State.ToggleLock;
            car.IsFuelFillerOpen = State.ToggleFuelCap;
            car.IsHoodOpen       = State.ToggleHood;
            car.IsRoofOpen       = State.ToggleRoof;
            car.IsTrunkOpen      = State.ToggleTrunk;

            _context.Entry(car).State = EntityState.Modified;
            _context.SaveChanges();
        }
Ejemplo n.º 3
0
        public void PutLockState(int id, LockStateDTO lockState)
        {
            Car car = _carService.GetCar(id);

            car.AreDoorsBlocked  = lockState.AreDoorsBlocked;
            car.IsFuelFillerOpen = lockState.IsFuelFillerOpen;
            car.IsHoodOpen       = lockState.IsHoodOpen;
            car.IsRoofOpen       = lockState.IsRoofOpen;
            car.IsTrunkOpen      = lockState.IsTrunkOpen;

            _context.Entry(car).State = EntityState.Modified;
            _context.SaveChanges();
        }