Beispiel #1
0
        private static void FindVehicle(GarageHandler handler)
        {
            Console.WriteLine("Please enter your search query: (enter nothing to cancel)");
            string query = Prompt();

            if (string.IsNullOrWhiteSpace(query))
            {
                return;
            }

            IEnumerable <Vehicle> matches = handler.SearchVehicles(query);

            if (!matches.Any())
            {
                Console.WriteLine("No matches.");
                return;
            }
            Console.WriteLine("Found vehicles:");
            ListVehicles(handler, matches);
        }