CategoriesWithProducts.CategoriesWithProductsUI.Main C# (CSharp) Method

Main() static private method

static private Main ( ) : void
return void
        static void Main()
        {
            string decorationLine = new string('-', Console.WindowWidth);
            Console.Write(decorationLine);
            Console.WriteLine("***Getting the categories and the prodcuts in them");
            Console.WriteLine("from the 'Northwind' database***");
            Console.Write(decorationLine);

            SqlConnection dbConnection = new SqlConnection(Settings.Default.DBConnectionString);

            IEnumerable<string> categoriesWithProducts = GetCategoriesWithProducts(dbConnection);
            Console.WriteLine("The categories and the products in them are:");
            foreach (string categoryProductPair in categoriesWithProducts)
            {
                Console.WriteLine("{0}", categoryProductPair);
            }
        }
CategoriesWithProductsUI