private static void ShowProductByProductID(int productID) { DataRepository repo = new DataRepository(); Product product = repo.GetProductByProductID(productID); Console.WriteLine(@"ProductID = {0} Product Name = {1} Category Name = {2} Description = {3} Unit Price ={4} Units In Stock = {5} ********************************", product.ProductID, product.ProductName, product.CategoryName, product.Description, product.UnitPrice, product.UnitsInStock); }
private static void ShowAllProducts() { DataRepository repo = new DataRepository(); Console.WriteLine("All Products"); Console.WriteLine("----------------------"); foreach (var product in repo.GetAllProducts()) { Console.WriteLine(@"ProductID = {0} Product Name = {1} Category Name = {2} Description = {3} Unit Price ={4} Units In Stock = {5} ********************************", product.ProductID, product.ProductName, product.CategoryName, product.Description, product.UnitPrice, product.UnitsInStock); } }