Exemple #1
0
        static void AddNewChore(ChoreRepository choreRepo)
        {
            Console.Clear();
            Console.SetCursorPosition((Console.WindowWidth - 9) / 2, Console.CursorTop);
            Console.WriteLine("New Chore");
            Console.SetCursorPosition((Console.WindowWidth - 9) / 2, Console.CursorTop);
            Console.WriteLine("---------");
            Console.WriteLine("\nPlease enter the name of the new chore.");
            Chore newChore = new Chore()
            {
                Name = Console.ReadLine()
            };

            Console.WriteLine(" ...");

            choreRepo.Add(newChore);

            Console.WriteLine($"\n{newChore.Name} added to the list");
        }