示例#1
0
        public void Switch(int id)
        {
            Oven Oven = this.GetOvenById(id);

            if (Oven.IsOn)
            {
                Oven.Off();
            }
            else
            {
                Oven.On();
            }
            this.Unit.SaveChanges();
        }