Пример #1
0
        private static void ProductTest()
        {
            ProductManager productManager = new ProductManager(new EfProductDal());
            var            result         = productManager.GetProductDetials();

            if (result.Success == true)
            {
                foreach (var item in productManager.GetAll().Data)
                {
                    Console.WriteLine(item.ProductName);
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }
Пример #2
0
        private static void ProductTest()
        {
            ProductManager productManager = new ProductManager(new EfProductDal(), new CategoryManager(new EfCategoryDal()));

            var result = productManager.GetProductDetials();

            if (result.Success == true)
            {
                foreach (var product in result.Data)
                {
                    Console.WriteLine(product.ProductName + "/" + product.CategoryName);
                }
            }
            else
            {
                Console.WriteLine(result.Message);
            }
        }