Esempio n. 1
0
        private void SearchProduct()
        {
            Console.WriteLine("Enter the name of the color you are looking for:");
            string name = Console.ReadLine();

            try
            {
                Product foundProduct = _shopBL.GetColor(new Product(name));
                Console.WriteLine(foundProduct.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.WriteLine($"Color {name} not found. You can add it to the database");
            }
        }