Exemple #1
0
        public void SeedContent()
        {
            Badges firstbadge = new Badges();

            firstbadge.ID = 123;
            Doors firstDoor = new Doors();

            firstDoor.Door = "Door C";
            Doors secondDoor = new Doors();

            secondDoor.Door = "Door 121";
            List <Doors> doors = new List <Doors>()
            {
                firstDoor, secondDoor
            };

            firstbadge.Door = doors;
        }
Exemple #2
0
        public void DoorEase()
        {
            Console.WriteLine($"What door can they activate?");
            door = Console.ReadLine();
            var door2 = new Doors()
            {
                Door = door
            };

            doorsList.Add(door2);
            Console.WriteLine("Add more? y/n");
            string answer = Console.ReadLine();
            bool   loop   = true;

            while (loop)
            {
                switch (answer)
                {
                case "y":
                case "Y":
                    Console.WriteLine($"What's another door to add to it?");
                    door  = Console.ReadLine();
                    door2 = new Doors()
                    {
                        Door = door
                    };
                    doorsList.Add(door2);
                    break;

                case "n":
                case "N":
                    Console.WriteLine($"This Badge has been updated");
                    loop = false;
                    break;

                default:
                    break;
                }
            }
        }