Exemple #1
0
        private static void GetById()
        {
            ProductManager productManager = new ProductManager(new EfProductDal(), new CategoryManager(new EfCategoryDal()));
            var            result         = productManager.GetById(5);

            Console.WriteLine(result.Data);
            Console.WriteLine(productManager.GetById(5).Data);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            ProductManager productManager = new ProductManager(new InMemoryProductDal());

            foreach (var product in productManager.GetById())
            {
                Console.WriteLine(product.ProductId);
            }
        }
        private static void CategoryTestleri()
        {
            //CategoryManager categoryManager = new CategoryManager(new EfCategoryDal());
            //foreach (var category in categoryManager.GetCategory().Data)
            //{
            //    Console.WriteLine(category.CategoryName);

            //}

            ProductManager pm = new ProductManager(new EfProductDal(), new CategoryManager(new EfCategoryDal()));

            foreach (var item in pm.GetById(34).Data.ProductName)
            {
                Console.WriteLine(item);
            }
        }