Ejemplo n.º 1
0
        private static void DeleteGarage(GarageHandler handler)
        {
            var list = handler.FormattedGarageList.ToList();

            list.Add("-Cancel-");
            Console.WriteLine("Pick a garage to delete:");
            var sel = Menu(list.ToArray());

            if (sel >= 0 && sel < handler.AmountOfGarages)
            {
                var entry = handler.Garages.Skip(sel).First();
                handler.DeleteGarage(entry);
                Console.WriteLine($"Deleted Garage {entry}");
            }
        }