public void Switch(int id) { Conditioner Conditioner = this.GetConditionerById(id); if (Conditioner.IsOn) { Conditioner.Off(); } else { Conditioner.On(); } this.Unit.SaveChanges(); }
public void Execute() { c.On(); }