Ejemplo n.º 1
0
        private static void ProductTest()
        {
            ProductManager productManager = new ProductManager(new EFProductDal());

            foreach (var item in productManager.GetAll())
            {
                Console.WriteLine(item.ProductId + "   " + item.ProductName + "    " + item.UnitPrice);
            }
            Console.WriteLine("-----------------------");
            foreach (var item in productManager.GetAllByCatergoryId(2))
            {
                Console.WriteLine(item.ProductId + "   " + item.ProductName + "    " + item.UnitPrice);
            }
            Console.WriteLine("-----------------------");
            foreach (var item in productManager.GetByUnitPrice(40, 100))
            {
                Console.WriteLine(item.ProductId + "   " + item.ProductName + "    " + item.UnitPrice);
            }
        }